X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fsymfony%2Fexpression-language%2FParserCache%2FArrayParserCache.php;fp=vendor%2Fsymfony%2Fexpression-language%2FParserCache%2FArrayParserCache.php;h=1d2aedb5145011caff4604470e422fef389c7f51;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/vendor/symfony/expression-language/ParserCache/ArrayParserCache.php b/vendor/symfony/expression-language/ParserCache/ArrayParserCache.php new file mode 100644 index 000000000..1d2aedb51 --- /dev/null +++ b/vendor/symfony/expression-language/ParserCache/ArrayParserCache.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\ExpressionLanguage\ParserCache; + +use Symfony\Component\ExpressionLanguage\ParsedExpression; + +/** + * @author Adrien Brault + */ +class ArrayParserCache implements ParserCacheInterface +{ + /** + * @var array + */ + private $cache = array(); + + /** + * {@inheritdoc} + */ + public function fetch($key) + { + return isset($this->cache[$key]) ? $this->cache[$key] : null; + } + + /** + * {@inheritdoc} + */ + public function save($key, ParsedExpression $expression) + { + $this->cache[$key] = $expression; + } +}