protected function getReflectionPropertyFrom($argument)
    {
        // No property name is given for targetting.
        if (is_null($this->keyName)) {
            throw new InvalidArgumentException('Property name to target is required');
        }

        // Argument is an Object.
        if (is_object($argument)) {
            $argument = get_class($argument);
        }

        // Get Reflected property of the object.
        return new ReflectionProperty($argument, $this->keyName);
    }
protected function getReflectionPropertyFrom($argument)
    {
        // No property name is given for targetting.
        if (is_null($this->keyName)) {
            throw new InvalidArgumentException('Property name to target is required');
        }

        // Argument is an Object.
        if (is_object($argument)) {
            $argument = get_class($argument);
        }

        // Get Reflected property of the object.
        return new ReflectionProperty($argument, $this->keyName);
    }
protected function getReflectionPropertyFrom ( $ argument ) { // No property name is given for targetting. if ( is_null ( $ this -> keyName ) ) { throw new InvalidArgumentException ( 'Property name to target is required' ) ; } // Argument is an Object. if ( is_object ( $ argument ) ) { $ argument = get_class ( $ argument ) ; } // Get Reflected property of the object. return new ReflectionProperty ( $ argument , $ this -> keyName ) ; }
Get the ReflectionProperty for a given argument.

@param mixed $argument

@throws InvalidArgumentException

@return ReflectionProperty
Get the ReflectionProperty for a given argument .