public static function generate($originalClassName, array $methods = null, array $properties = null,
                                    $proxyClassName = '', $callAutoload = false)
    {

        self::$exposeMethods = false;
        self::$exposeProperties = false;

        if ($proxyClassName == '') {
            $key = md5(
                $originalClassName . serialize($methods) . serialize($properties)
            );

            if (isset(self::$cache[$key])) {
                return self::$cache[$key];
            }
        }

        if (!empty($methods)) {
            self::$exposeMethods = true;
        }

        if (!empty($properties)) {
            self::$exposeProperties = true;
        }

        $proxy = self::generateProxy(
            $originalClassName, $methods, $properties, $proxyClassName, $callAutoload
        );

        if (isset($key)) {
            self::$cache[$key] = $proxy;
        }

        return $proxy;
    }
public static function generate($originalClassName, array $methods = null, array $properties = null,
                                    $proxyClassName = '', $callAutoload = false)
    {

        self::$exposeMethods = false;
        self::$exposeProperties = false;

        if ($proxyClassName == '') {
            $key = md5(
                $originalClassName . serialize($methods) . serialize($properties)
            );

            if (isset(self::$cache[$key])) {
                return self::$cache[$key];
            }
        }

        if (!empty($methods)) {
            self::$exposeMethods = true;
        }

        if (!empty($properties)) {
            self::$exposeProperties = true;
        }

        $proxy = self::generateProxy(
            $originalClassName, $methods, $properties, $proxyClassName, $callAutoload
        );

        if (isset($key)) {
            self::$cache[$key] = $proxy;
        }

        return $proxy;
    }
public static function generate ( $ originalClassName , array $ methods = null , array $ properties = null , $ proxyClassName = '' , $ callAutoload = false ) { self :: $ exposeMethods = false ; self :: $ exposeProperties = false ; if ( $ proxyClassName == '' ) { $ key = md5 ( $ originalClassName . serialize ( $ methods ) . serialize ( $ properties ) ) ; if ( isset ( self :: $ cache [ $ key ] ) ) { return self :: $ cache [ $ key ] ; } } if ( ! empty ( $ methods ) ) { self :: $ exposeMethods = true ; } if ( ! empty ( $ properties ) ) { self :: $ exposeProperties = true ; } $ proxy = self :: generateProxy ( $ originalClassName , $ methods , $ properties , $ proxyClassName , $ callAutoload ) ; if ( isset ( $ key ) ) { self :: $ cache [ $ key ] = $ proxy ; } return $ proxy ; }
Gets the data to be used for the actual reflection.

If the class has already been reflected in the same configuration,
it will be fetched from the local cache.

@static

@param string     $originalClassName Name of the class to be reflected.
@param array|null $methods           (Optional) List of methods to be exposed.
@param array|null $properties        (Optional) List of properties to be exposed.
@param string     $proxyClassName    (Optional) Name to be used for the reflected class.
@param bool       $callAutoload      (Optional) Switch to run the autoloader.

@return array The data to be used for the actual reflection.
Gets the data to be used for the actual reflection .