Welcome Guest, Not a member yet? Register   Sign In
Using Zend Framework components in CI
#3

[eluser]mihailt[/eluser]
probably a slightly change would improve it Smile
Code:
<?php if (!defined('BASEPATH')) {exit('No direct script access allowed');}

/**
* Zend Framework Loader
*
* Put the 'Zend' folder (unpacked from the Zend Framework package, under 'Library')
* in CI installation's 'application/libraries' folder
* You can put it elsewhere but remember to alter the script accordingly
*
* Usage:
*   1) $this->load->library('zend', 'Zend/Package/Name');
*   or
*   2) $this->load->library('zend');
*      then $this->zend->load('Zend/Package/Name');
*
* * the second usage is useful for autoloading the Zend Framework library
* * Zend/Package/Name does not need the '.php' at the end
*/
class CI_Zend
{
    /**
     * Constructor
     *
     * @param    string $class class name
     */
    function __construct($class = NULL)
    {
        // include path for Zend Framework
        // alter it accordingly if you have put the 'Zend' folder elsewhere

        ini_set('include_path',
        ini_get('include_path'). PATH_SEPARATOR . BASEPATH . 'extensions/');
        require_once('Zend/Loader.php');
        

        if ($class)
        {
            Zend_Loader::loadClass($class);
            log_message('debug', "Zend Class $class Loaded");
        }
        else
        {
            log_message('debug', "Zend Class Initialized");
        }
    }

    /**
     * Zend Class Loader
     *
     * @param    string $class class name
     */

    function load($class)
    {
        Zend_Loader::loadClass($class);
        log_message('debug', "Zend Class $class Loaded");
    }
}

?>


Messages In This Thread
Using Zend Framework components in CI - by El Forum - 12-12-2008, 04:01 AM
Using Zend Framework components in CI - by El Forum - 12-12-2008, 04:10 AM
Using Zend Framework components in CI - by El Forum - 12-12-2008, 06:28 AM
Using Zend Framework components in CI - by El Forum - 12-12-2008, 06:37 AM
Using Zend Framework components in CI - by El Forum - 12-12-2008, 06:46 AM
Using Zend Framework components in CI - by El Forum - 12-12-2008, 07:57 AM
Using Zend Framework components in CI - by El Forum - 12-12-2008, 08:14 AM
Using Zend Framework components in CI - by El Forum - 12-13-2008, 11:17 PM
Using Zend Framework components in CI - by El Forum - 12-14-2008, 04:10 PM
Using Zend Framework components in CI - by El Forum - 12-15-2008, 02:59 AM
Using Zend Framework components in CI - by El Forum - 12-15-2008, 02:59 AM
Using Zend Framework components in CI - by El Forum - 12-15-2008, 04:31 AM
Using Zend Framework components in CI - by El Forum - 12-15-2008, 06:28 AM
Using Zend Framework components in CI - by El Forum - 12-15-2008, 08:14 AM
Using Zend Framework components in CI - by El Forum - 12-15-2008, 09:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB