Phrozn/Provider/Factory.php
public function create($type, $data)
    {
        // try to see if we have user defined plugin
        $class = 'PhroznPlugin\\Provider\\' . ucfirst($type);
        if (!class_exists($class)) {
            $class = 'Phrozn\\Provider\\' . ucfirst($type);
            if (!class_exists($class)) {
                throw new \RuntimeException("Provider of type '{$type}' not found..");
            }
        }
        $object = new $class;
        $object->setConfig($data);
        return $object;
    }
public function create($type, $data)
    {
        // try to see if we have user defined plugin
        $class = 'PhroznPlugin\\Provider\\' . ucfirst($type);
        if (!class_exists($class)) {
            $class = 'Phrozn\\Provider\\' . ucfirst($type);
            if (!class_exists($class)) {
                throw new \RuntimeException("Provider of type '{$type}' not found..");
            }
        }
        $object = new $class;
        $object->setConfig($data);
        return $object;
    }
public function create ( $ type , $ data ) { // try to see if we have user defined plugin $ class = 'PhroznPlugin\\Provider\\' . ucfirst ( $ type ) ; if ( ! class_exists ( $ class ) ) { $ class = 'Phrozn\\Provider\\' . ucfirst ( $ type ) ; if ( ! class_exists ( $ class ) ) { throw new \ RuntimeException ( "Provider of type '{$type}' not found.." ) ; } } $ object = new $ class ; $ object -> setConfig ( $ data ) ; return $ object ; }
Create provider instance

@param string $type Provider typ to initialize
@param mixed $data Provider data

return \Phrozn\Provider
Create provider instance