static function getIncludePaths() { $helper = JPlantLoader::_getHelperInstance(); return $helper->getIncludePaths(); } static function _getHelperInstance() { static $helper; if (is_null($helper)) { $helper = new JPlantLoaderHelper(); } return $helper; } } class JPlantLoaderHelper { var $_includePaths = array(); function registerIncludePath($includePath) { if (!in_array($includePath, $this->_includePaths)) { $this->_includePaths[] = $includePath; } } function getIncludePaths() { return $this->_includePaths; } } } JPlantLoader::registerIncludePath(dirname(__FILE__));