/** * This method creates a parser instance with a default context and tries to * parse the class for the given class name. * * @param string $className Qualified name of the searched class. * * @return \pdepend\reflection\api\StaticReflectionInterface */ private function _parseClass($className) { $parser = new Parser($this->createContext()); $classes = $parser->parseFile($this->getPathnameForClass($className)); return $classes[0]; }
/** * This method parses all classes within the source file where a class or * interface that matches <b>$className</b> is declared. All found reflection * objects will be stored in the internal cache for later reuse. * * @param string $className Full qualified name of the searched class. * * @return void */ private function _parseFileForClass($className) { $parser = new Parser($this->_context); return $parser->parseFile($this->_resolver->getPathnameForClass($className)); }
/** * Parses all classes and interfaces within the given source code file and * returns a <b>\ReflectionClass</b> instance for each of that items. * * @param string $pathName The pathname of a source code file. * * @return array(\ReflectionClass) */ protected function parseFile($pathName) { $parser = new Parser($this->_context); return $parser->parseFile($pathName); }
/** * Creates an internal reflection class instance. * * @param string $className Name of the searched class. * * @return \ReflectionClass */ protected function createStaticClass($className) { $parser = new Parser($this->createContext()); $classes = $parser->parseFile($this->getPathnameForClass($className)); return $classes[0]; }