protected function parseFromReflectionByRange(ReflectionClass $reflection, $range)
    {
        $dependencies = [];

        switch ($range) {
            case self::RANGE_CLASS:
                $dependencies = array_merge($dependencies, $this->parseFromClassComment($reflection));
                break;

            case self::RANGE_METHODS:
                $dependencies = array_merge($dependencies, $this->parseFromClassMethods($reflection));
                break;

            case self::RANGE_PROPERTIES:
                $dependencies = array_merge($dependencies, $this->parseFromClassProperties($reflection));
                break;

            case self::RANGE_SINGLE_ELEMENT:
                throw new Doozr_Di_Exception(
                    'Parsing from single element not implemented yet!'
                );
                break;

            default:
            case self::RANGE_EVERYTHING:
                $dependencies = array_merge($dependencies, $this->parseFromClassComment($reflection));
                $dependencies = array_merge($dependencies, $this->parseFromClassMethods($reflection));
                $dependencies = array_merge($dependencies, $this->parseFromClassProperties($reflection));
                break;
        }

        return $dependencies;
    }
protected function parseFromReflectionByRange(ReflectionClass $reflection, $range)
    {
        $dependencies = [];

        switch ($range) {
            case self::RANGE_CLASS:
                $dependencies = array_merge($dependencies, $this->parseFromClassComment($reflection));
                break;

            case self::RANGE_METHODS:
                $dependencies = array_merge($dependencies, $this->parseFromClassMethods($reflection));
                break;

            case self::RANGE_PROPERTIES:
                $dependencies = array_merge($dependencies, $this->parseFromClassProperties($reflection));
                break;

            case self::RANGE_SINGLE_ELEMENT:
                throw new Doozr_Di_Exception(
                    'Parsing from single element not implemented yet!'
                );
                break;

            default:
            case self::RANGE_EVERYTHING:
                $dependencies = array_merge($dependencies, $this->parseFromClassComment($reflection));
                $dependencies = array_merge($dependencies, $this->parseFromClassMethods($reflection));
                $dependencies = array_merge($dependencies, $this->parseFromClassProperties($reflection));
                break;
        }

        return $dependencies;
    }
protected function parseFromReflectionByRange ( ReflectionClass $ reflection , $ range ) { $ dependencies = [ ] ; switch ( $ range ) { case self :: RANGE_CLASS : $ dependencies = array_merge ( $ dependencies , $ this -> parseFromClassComment ( $ reflection ) ) ; break ; case self :: RANGE_METHODS : $ dependencies = array_merge ( $ dependencies , $ this -> parseFromClassMethods ( $ reflection ) ) ; break ; case self :: RANGE_PROPERTIES : $ dependencies = array_merge ( $ dependencies , $ this -> parseFromClassProperties ( $ reflection ) ) ; break ; case self :: RANGE_SINGLE_ELEMENT : throw new Doozr_Di_Exception ( 'Parsing from single element not implemented yet!' ) ; break ; default : case self :: RANGE_EVERYTHING : $ dependencies = array_merge ( $ dependencies , $ this -> parseFromClassComment ( $ reflection ) ) ; $ dependencies = array_merge ( $ dependencies , $ this -> parseFromClassMethods ( $ reflection ) ) ; $ dependencies = array_merge ( $ dependencies , $ this -> parseFromClassProperties ( $ reflection ) ) ; break ; } return $ dependencies ; }
Parses the dependencies from a given reflection for defined range and optional method or property.

@param ReflectionClass $reflection The reflection instance to parse from
@param int             $range      The range to parse from

@author Benjamin Carl <opensource@clickalicious.de>

@return array An raw array containing the dependencies indexed

@throws Doozr_Di_Exception
Parses the dependencies from a given reflection for defined range and optional method or property .