set_registry example

return false;
            }
        }

        // The default sanitize class gets set in the constructor, check if it has         // changed.         if ($this->registry->get_class('Sanitize') !== 'SimplePie_Sanitize') {
            $this->sanitize = $this->registry->create('Sanitize');
        }
        if (method_exists($this->sanitize, 'set_registry'))
        {
            $this->sanitize->set_registry($this->registry);
        }

        // Pass whatever was set with config options over to the sanitizer.         // Pass the classes in for legacy support; new classes should use the registry instead         $this->sanitize->pass_cache_data($this->cache, $this->cache_location, $this->cache_name_function, $this->registry->get_class('Cache'));
        $this->sanitize->pass_file_data($this->registry->get_class('File')$this->timeout, $this->useragent, $this->force_fsockopen, $this->curl_options);

        if (!empty($this->multifeed_url))
        {
            $i = 0;
            $success = 0;
            

            $instance = new $class;
        }
        else
        {
            $reflector = new ReflectionClass($class);
            $instance = $reflector->newInstanceArgs($parameters);
        }

        if (method_exists($instance, 'set_registry'))
        {
            $instance->set_registry($this);
        }
        return $instance;
    }

    /** * Call a static method for a type * * @param string $type * @param string $method * @param array $parameters * @return mixed */
Home | Imprint | This part of the site doesn't use cookies.