Threaded View

  1. #1
    Ext User
    Join Date
    Apr 2009
    Vote Rating
    goachka is on a distinguished road


    Default Ext.Direct for CodeIgniter

    Ext.Direct for CodeIgniter

    Just copy archive contents to your application folder.
    It will create cache folder in your application folder (make this folder writable!).
    It will place extdapi.php, extdcacheprovider.php, extdrouter.php to the libraries folder.
    It will place example classes Echo.php, Exception.php, File.php, Time.php to the same folder.
    And it will place direct.php to the controllers folder.

    Now you can test it:
    1. Add a script tag in your main application page for the API:
    <script type="text/javascript" src="<?=base_path()?>direct/api"></script>
    2. Add provider:
    3. Now you can call some method, for example Time.get():
    Ext.mits.Time.get(function(provider, response) {
        Ext.Msg.alert('response', response.result);
    Now you can use your own classes:
    Place them to the libraries folder. Don't forget to make comments before each method of your class. First of all it should have @remotable attribute:
    class Time {
         * @remotable
        public function get(){
            return date('m-d-Y H:i:s');
    If you use method to submit form, add @formHandler attribute:
     * @remotable
     * @formHandler
    Just see example classes, included in this implementation.

    To include your own classes replace $api definition in file direct.php with your own:
    Classes files should be named accordingly MyClass1.php, MyClass2.php, ...

    If you want to use CodeIgniter object in your classes, just get instance:
    PHP Code:
    $CI =& get_instance(); 
    P.S. This code doesn't work on Windows platform, because of backslashes in win paths.. something should be updated...
    Attached Files

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar