CodeIgniter Forums
Integrating amfphp and codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Integrating amfphp and codeigniter (/showthread.php?tid=26584)



Integrating amfphp and codeigniter - El Forum - 01-18-2010

[eluser]cris_mashups[/eluser]
Hi everyone!

Does anyone knows here how to integrate the two (amfphp+codeigniter)?
A clear and simple sample code would be highly appreciated Smile coz im new to it.

Thanks a lot.Keep safe!


Integrating amfphp and codeigniter - El Forum - 01-18-2010

[eluser]ortenheim[/eluser]
[quote author="cris_mashups" date="1263825204"]Hi everyone!

Does anyone knows here how to integrate the two (amfphp+codeigniter)?
A clear and simple sample code would be highly appreciated Smile coz im new to it.

Thanks a lot.Keep safe![/quote]

see this Smile

http://codeigniter.com/wiki/AMF_Codeigniter_Library_No_Zend_No_Hooks_Etc./


Integrating amfphp and codeigniter - El Forum - 01-18-2010

[eluser]cris_mashups[/eluser]
Hi ortrnheim yeah i've alreasy seen that. But how does it works?lol i downloaded the files and copied it to my host.then i run it to browser and it says Welcome to CodeIgniter! so meaning it works already?for sure my CI worked but how about the amfphp?


Integrating amfphp and codeigniter - El Forum - 01-18-2010

[eluser]iamjerson[/eluser]
the library is great.. i will test this out


Integrating amfphp and codeigniter - El Forum - 01-27-2010

[eluser]ortenheim[/eluser]
Yes you need to make sure CI is working and it seems it does...

Then follow the steps here:
http://ellislab.com/forums/viewthread/108947/

to make sure the amf is working correctly go into "browser/" catalog in your browser to start the amf-browser

here you can see any errors if you have any more issues i would recommend you to write them here: http://ellislab.com/forums/viewthread/108947/


Integrating amfphp and codeigniter - El Forum - 03-01-2010

[eluser]ortenheim[/eluser]
Has anyone got to use any value objects (VO)?

i get this error in my flex application and in the browser, even when posting the right data:

Code:
(Object)#0
  message = "faultCode:AMFPHP_RUNTIME_ERROR faultString:'Argument 1 passed to Login_model::getUser() must be an instance of LoginVO, null given' faultDetail:'/Applications/MAMP/htdocs/clean-ci-amfphp/application/models/login_model.php on line 14'"
  name = "Error"
  rootCause = (null)

login model:
Code:
<?php

if (! defined('BASEPATH')) exit('No direct script access');

require_once("vo/LoginVO.php");

class Login_model extends Model {

    //php 5 constructor
    function __construct() {
        parent::Model();
    }
    
    public function getUser(LoginVO $loginVO) {
        if($loginVO->username    == "admin"
            && $loginVO->password == "admin")
        {
            $adminVO = new LoginVO();
            $adminVO->username = $loginVO->username;
            $adminVO->password = $loginVO->password;
            return $adminVO;    
        }
        else
        {
            throw new Exception("Invalid username or password, please try it again.");
        }
    }

When the vo is in: "services/vo/" they are not recognized so i put it in the "model/vo/" folder instead but still it isnt working from flex or the browser. note also that i tried having the vo in both places.

the php vo:
Code:
<?php
class LoginVO {
    var $username = "";
    var $password = "";
    //var $loginDate = "";
    
    var $_explicitType = "org.pmvc.model.vo.LoginVO";
  }
?>

the as3 vo:
Code:
package org.pmvc.model.vo
{
    [RemoteClass(alias="org.pmvc.model.vo.LoginVO")]
    [Bindable]
    public class LoginVO
    {
      public var username:String;
      public var password:String;
      
      public function LoginVO()
      {
      }
    }
    
}

has anyone got this to work? what am i doing wrong?


Integrating amfphp and codeigniter - El Forum - 03-01-2010

[eluser]Udi[/eluser]
Nice.. I currently working with AMFPHP too, but I decided that the best for me is not using it with CI..

If its not a secret - what type of application you're working on that involves AMFPHP and CI ?