public static function loadObjectReflection($object)
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException(sprintf(
                'Could not load reflection for non object. Given: "%s".',
                gettype($object)
            ));
        }

        $hash = spl_object_hash($object);

        if (isset(self::$objectReflections[$hash])) {
            return self::$objectReflections[$hash];
        }

        $reflection = new \ReflectionObject($object);

        self::$objectReflections[$hash] = $reflection;

        return $reflection;
    }
public static function loadObjectReflection($object)
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException(sprintf(
                'Could not load reflection for non object. Given: "%s".',
                gettype($object)
            ));
        }

        $hash = spl_object_hash($object);

        if (isset(self::$objectReflections[$hash])) {
            return self::$objectReflections[$hash];
        }

        $reflection = new \ReflectionObject($object);

        self::$objectReflections[$hash] = $reflection;

        return $reflection;
    }
public static function loadObjectReflection ( $ object ) { if ( ! is_object ( $ object ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Could not load reflection for non object. Given: "%s".' , gettype ( $ object ) ) ) ; } $ hash = spl_object_hash ( $ object ) ; if ( isset ( self :: $ objectReflections [ $ hash ] ) ) { return self :: $ objectReflections [ $ hash ] ; } $ reflection = new \ ReflectionObject ( $ object ) ; self :: $ objectReflections [ $ hash ] = $ reflection ; return $ reflection ; }
Load object reflection

@param object $object

@return \ReflectionObject
Load object reflection