Phrozn\Autoloader::getInstance PHP Method

getInstance() public static method

Singleton instance
public static getInstance ( ) : Autoloader
return Autoloader
    public static function getInstance()
    {
        if (null === self::$instance) {
            self::$instance = new self();
        }
        return self::$instance;
    }

Usage Example

示例#1
0
文件: Twig.php 项目: farazdagi/phrozn
 /**
  * If configuration options are passed then twig environment
  * is initialized right away
  *
  * @param array $options Processor options
  *
  * @return \Phrozn\Processor\Twig
  */
 public function __construct($options = array())
 {
     $path = Loader::getInstance()->getPath('library');
     if (count($options)) {
         $this->setConfig($options)->getEnvironment();
     }
 }
All Usage Examples Of Phrozn\Autoloader::getInstance