%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/news/vendor/mockery/mockery/library/Mockery/Generator/
Upload File :
Create Path :
Current File : /var/www/html/news/vendor/mockery/mockery/library/Mockery/Generator/CachingGenerator.php

<?php

namespace Mockery\Generator;

class CachingGenerator implements Generator
{
    protected $generator;
    protected $cache = array();

    public function __construct(Generator $generator)
    {
        $this->generator = $generator;
    }

    public function generate(MockConfiguration $config)
    {
        $hash = $config->getHash();
        if (isset($this->cache[$hash])) {
            return $this->cache[$hash];
        }

        $definition = $this->generator->generate($config);
        $this->cache[$hash] = $definition;

        return $definition;
    }
}

Zerion Mini Shell 1.0