Pimcore\Model\Tool\Lock::get PHP Method

get() public static method

public static get ( $key ) : Lock
$key
return Lock
    public static function get($key)
    {
        $lock = new self();
        $lock->getById($key);
        return $lock;
    }

Usage Example

示例#1
0
 /**
  * @return mixed
  */
 public function getLastExecution()
 {
     $lock = Model\Tool\Lock::get($this->_pidFileName);
     if ($date = $lock->getDate()) {
         return $date;
     }
     return;
 }