X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FContext%2FReader%2FContextReaderCachedPerContext.php;fp=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FContext%2FReader%2FContextReaderCachedPerContext.php;h=0000000000000000000000000000000000000000;hp=8a51662e23869954efb9fdb6cdffe28350c9e5e8;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/behat/behat/src/Behat/Behat/Context/Reader/ContextReaderCachedPerContext.php b/vendor/behat/behat/src/Behat/Behat/Context/Reader/ContextReaderCachedPerContext.php deleted file mode 100644 index 8a51662e2..000000000 --- a/vendor/behat/behat/src/Behat/Behat/Context/Reader/ContextReaderCachedPerContext.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Behat\Behat\Context\Reader; - -use Behat\Behat\Context\Environment\ContextEnvironment; - -/** - * Proxies call to another reader and caches context callees for a length of an entire exercise. - * - * @author Konstantin Kudryashov - */ -final class ContextReaderCachedPerContext implements ContextReader -{ - /** - * @var ContextReader - */ - private $childReader; - /** - * @var array[] - */ - private $cachedCallees = array(); - - /** - * Initializes reader. - * - * @param ContextReader $childReader - */ - public function __construct(ContextReader $childReader) - { - $this->childReader = $childReader; - } - - /** - * {@inheritdoc} - */ - public function readContextCallees(ContextEnvironment $environment, $contextClass) - { - if (isset($this->cachedCallees[$contextClass])) { - return $this->cachedCallees[$contextClass]; - } - - return $this->cachedCallees[$contextClass] = $this->childReader->readContextCallees( - $environment, $contextClass - ); - } -}