public function parse($range = self::RANGE_EVERYTHING)
    {
        // check if all requirements are fulfilled
        if (!$this->requirementsFulfilled()) {
            throw new Doozr_Di_Exception(
                'Error parsing annotations. Requirements not fulfilled. Please set input to parse annotations from.'
            );
        }

        // prepare input
        $input = $this->getInput();

        // check if class is already in scope
        if (!class_exists($input['className'])) {
            if (!isset($input['file'])) {
                throw new Doozr_Di_Exception(
                    'Error parsing dependencies from className. Class not found in scope and no "file" defined!'
                );
            }

            $this->loadFile($input['file']);
        }

        // create a reflection instance of the className
        $reflection = new ReflectionClass($input['className']);

        // parse annotation(s) from reflection and return result
        $this->lastResult = $this->parseFromReflectionByRange($reflection, $range);

        return $this->lastResult;
    }
public function parse($range = self::RANGE_EVERYTHING)
    {
        // check if all requirements are fulfilled
        if (!$this->requirementsFulfilled()) {
            throw new Doozr_Di_Exception(
                'Error parsing annotations. Requirements not fulfilled. Please set input to parse annotations from.'
            );
        }

        // prepare input
        $input = $this->getInput();

        // check if class is already in scope
        if (!class_exists($input['className'])) {
            if (!isset($input['file'])) {
                throw new Doozr_Di_Exception(
                    'Error parsing dependencies from className. Class not found in scope and no "file" defined!'
                );
            }

            $this->loadFile($input['file']);
        }

        // create a reflection instance of the className
        $reflection = new ReflectionClass($input['className']);

        // parse annotation(s) from reflection and return result
        $this->lastResult = $this->parseFromReflectionByRange($reflection, $range);

        return $this->lastResult;
    }
public function parse ( $ range = self :: RANGE_EVERYTHING ) { // check if all requirements are fulfilled if ( ! $ this -> requirementsFulfilled ( ) ) { throw new Doozr_Di_Exception ( 'Error parsing annotations. Requirements not fulfilled. Please set input to parse annotations from.' ) ; } // prepare input $ input = $ this -> getInput ( ) ; // check if class is already in scope if ( ! class_exists ( $ input [ 'className' ] ) ) { if ( ! isset ( $ input [ 'file' ] ) ) { throw new Doozr_Di_Exception ( 'Error parsing dependencies from className. Class not found in scope and no "file" defined!' ) ; } $ this -> loadFile ( $ input [ 'file' ] ) ; } // create a reflection instance of the className $ reflection = new ReflectionClass ( $ input [ 'className' ] ) ; // parse annotation(s) from reflection and return result $ this -> lastResult = $ this -> parseFromReflectionByRange ( $ reflection , $ range ) ; return $ this -> lastResult ; }
Parses the annotations out of input and return it as array.

This method is intend to build an array of options for each of the commands that were matched.
This options array is readable/similar to a dependency map item. This method requires only
argument one ($target) to work properly.

@param int $range The range to parse from

@author Benjamin Carl <opensource@clickalicious.de>

@return array Containing the dependencies build from annotations

@throws Doozr_Di_Exception
Parses the annotations out of input and return it as array .