public function setObject($object)
    {
        if ( ! is_object($object))
        {
            throw new InvalidArgumentException(
                'Expected an object, but got '.gettype($object)
            );
        }

        $this->object = new ReflectionClass($object);
    }
public function setObject($object)
    {
        if ( ! is_object($object))
        {
            throw new InvalidArgumentException(
                'Expected an object, but got '.gettype($object)
            );
        }

        $this->object = new ReflectionClass($object);
    }
public function setObject ( $ object ) { if ( ! is_object ( $ object ) ) { throw new InvalidArgumentException ( 'Expected an object, but got ' . gettype ( $ object ) ) ; } $ this -> object = new ReflectionClass ( $ object ) ; }
Set the object you want to work with.

@throws InvalidArgumentException
@param mixed $object
@return void
Set the object you want to work with .