Created
March 16, 2010 13:13
-
-
Save nojimage/333946 to your computer and use it in GitHub Desktop.
PEAR Class Loader for CakePHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* PEAR Class Loader for CakePHP | |
* | |
* ex. pear_import('Net_DNS'); | |
* | |
* @param $className | |
* @return boolean | |
*/ | |
function pear_import($className) { | |
$classPath = preg_replace('/_/', DS, $className) . '.php'; | |
return App::import('vendor', $className, array('file' => $classPath)); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment