Skip to content

Instantly share code, notes, and snippets.

@rande
Created March 19, 2010 15:38
Show Gist options
  • Save rande/337625 to your computer and use it in GitHub Desktop.
Save rande/337625 to your computer and use it in GitHub Desktop.
static protected $zendLoaded = false;
public function registerZend()
{
if (!self::$zendLoaded)
{
return;
}
// load the loader
$zflib = sfConfig::get('sf_lib_dir').'/vendor';
set_include_path($zflib.PATH_SEPARATOR.get_include_path());
require_once $zflib.'/Zend/Loader.php';
spl_autoload_register(function($class) {
if(substr($class, -11) == 'Translation')
{
return false;
}
Zend_Loader::loadClass($class);
});
self::$zendLoaded = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment