1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-12 16:14:16 +02:00

Flextype Core: RegistryTwigExtension - removed

This commit is contained in:
Awilum
2019-03-01 17:01:02 +03:00
parent e59b97f029
commit a0cb8d4375

View File

@@ -1,31 +0,0 @@
<?php
/**
* Slim Framework (http://slimframework.com)
*
* @link https://github.com/slimphp/Twig-View
* @copyright Copyright (c) 2011-2015 Josh Lockhart
* @license https://github.com/slimphp/Twig-View/blob/master/LICENSE.md (MIT License)
*/
namespace Flextype;
class RegistryTwigExtension extends \Twig_Extension
{
public function getFunctions()
{
return [
new \Twig_SimpleFunction('registry_get', array($this, 'get')),
new \Twig_SimpleFunction('registry_exists', array($this, 'exists')),
];
}
public function get($name)
{
return Registry::get($name);
}
public function exists(string $name) : bool
{
return Registry::exists($name);
}
}