4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\ExpressionLanguage\ParserCache;
14 use Symfony\Component\ExpressionLanguage\ParsedExpression;
17 * @author Adrien Brault <adrien.brault@gmail.com>
19 class ArrayParserCache implements ParserCacheInterface
24 private $cache = array();
29 public function fetch($key)
31 return isset($this->cache[$key]) ? $this->cache[$key] : null;
37 public function save($key, ParsedExpression $expression)
39 $this->cache[$key] = $expression;