hiqdev\assetpackagist\helpers\Locker::getInstance PHP Method

getInstance() public static method

public static getInstance ( $path )
    public static function getInstance($path)
    {
        return isset(static::$_instances[$path]) ? static::$_instances[$path] : new static($path);
    }

Usage Example

Example #1
0
 protected function getLocker()
 {
     if ($this->_locker === null) {
         $this->_locker = Locker::getInstance($this->buildPath('lock'));
         // TODO: get rid of singleton
     }
     return $this->_locker;
 }