- md5
- 27c258b55bf39a078a6eab41fcd3499e
- sha1
- 7b92dd7b78e7675338e787087003863f37807014
- sha256
- 9a4174dd31beb6ecf76b593dfe924c1893671365be6b1fcce41828f1b1f62a80
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
<?php
namespace TYPO3\PharStreamWrapper;
/*
* This file is part of the TYPO3 project.
*
* It is free software; you can redistribute it and/or modify it under the terms
* of the MIT License (MIT). For the full copyright and license information,
* please read the LICENSE file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
class Manager implements Assertable
{
/**
* @var self
*/
private static $instance;
/**
* @var Behavior
*/
private $behavior;
/**
* @param Behavior $behaviour
* @return self
*/
public static function initialize(Behavior $behaviour)
{
if (self::$instance === null) {
self::$instance = new self($behaviour);
return self::$instance;
}
throw new \LogicException(
'Manager can only be initialized once',
1535189871
);
}
/**
* @return self
*/
public static function instance()
{
if (self::$instance !== null) {
return self::$instance;
}
throw new \LogicException(
'Manager needs to be initialized first',
1535189872
);
}
/**
* @return bool
*/
public static function destroy()
{
if (self::$instance === null) {
return false;
}
self::$instance = null;
return true;
}
/**
* @param Behavior $behaviour
*/
private function __construct(Behavior $behaviour)
{
$this->behavior = $behaviour;
}
/**
* @param string $path
* @param string $command
* @return bool
*/
public function assert($path, $command)
{
return $this->behavior->assert($path, $command);
}
}
No other release has this exact content. See every version of this file.