/** * Loads a class based on the class name for legacy classes * @param string $className This is the class that you are attemption to load * @return mixed Return true on successful load, otherwise it returns a list of all the file locations * that it tried to load from */ private static function locateClassFromFileAndLoad($className) { $fileToLoad = ClassLocator::getLocation($className); if ($fileToLoad === false) { return ['none found']; } if (self::loadClassFromFile($className, $fileToLoad)) { return true; } return [$fileToLoad]; }
public function browse() { $classes = array(); foreach (ClassLocator::getDefaultClassLocator()->getLocatorArray() as $className => $fileName) { if (preg_match(AutoLoader::THIRD_PARTY_REGEX, $fileName)) { continue; } $classes[$fileName] = $className; } asort($classes); $html = '<H4>Below are a list of classes, Click on class to view source</h4>' . Tag::form(array('method' => 'get')) . MenuUtils::responseObject()->action(__CLASS__ . '->' . __FUNCTION__ . '()')->toHidden(false) . Lists::select('fldFileName', $classes, array('size' => '7', 'onClick' => 'submit();')) . Tag::_form(); return $html . $this->sourceCode(); }
private static function setUpAutoLoader() { \Jackbooted\Util\AutoLoader::init(); \Jackbooted\Time\Stopwatch::init(); \Jackbooted\Util\ClassLocator::init(self::get('class_path')); }