Overview

Namespaces

  • Composer
    • Autoload
  • Guzzle
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Mock
    • Stream
  • Mockery
    • Adapter
      • Phpunit
    • CountValidator
    • Exception
    • Generator
      • StringManipulation
        • Pass
    • Loader
    • Matcher
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • Fatzebra
      • Message
  • PHP
  • Symfony
    • Component
      • EventDispatcher
        • Debug
        • DependencyInjection
        • Tests
          • Debug
          • DependencyInjection
      • HttpFoundation
        • File
          • Exception
          • MimeType
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
        • Tests
          • File
            • MimeType
          • Session
            • Attribute
            • Flash
            • Storage
              • Handler
              • Proxy
      • Yaml
        • Exception
        • Tests

Classes

  • Symfony\Component\Yaml\Tests\A
  • Symfony\Component\Yaml\Tests\B
  • Symfony\Component\Yaml\Tests\DumperTest
  • Symfony\Component\Yaml\Tests\InlineTest
  • Symfony\Component\Yaml\Tests\ParseExceptionTest
  • Symfony\Component\Yaml\Tests\ParserTest
  • Symfony\Component\Yaml\Tests\YamlTest
  • Overview
  • Namespace
  • Function
  • Tree
 1: <?php
 2: 
 3: namespace Mockery\Generator;
 4: 
 5: class CachingGenerator implements Generator
 6: {
 7:     protected $generator;
 8:     protected $cache = array();
 9: 
10:     public function __construct(Generator $generator)
11:     {
12:         $this->generator = $generator;
13:     }
14: 
15:     public function generate(MockConfiguration $config)
16:     {
17:         $hash = $config->getHash();
18:         if (isset($this->cache[$hash])) {
19:             return $this->cache[$hash];
20:         }
21: 
22:         $definition = $this->generator->generate($config);
23:         $this->cache[$hash] = $definition;
24: 
25:         return $definition;
26:     }
27: }
28: 
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen