NodeVisitor\Scope (Bridge\Twig)
Symfony\Bridge\Twig\NodeVisitor\Scope
class Scope
Methods
__construct(Scope $parent = null) | ||
Scope | enter() Opens a new child scope. | |
Scope|null | leave() Closes current scope and returns parent one. | |
Scope | set(string $key, mixed $value) Stores data into current scope. | |
bool | has(string $key) Tests if a data is visible from current scope. | |
mixed | get(string $key, mixed $default = null) Returns data visible from current scope. |
Details
public __construct(Scope $parent = null)
public Scope enter()
Opens a new child scope.
public Scope|null leave()
Closes current scope and returns parent one.
public Scope set(string $key, mixed $value)
Stores data into current scope.
public bool has(string $key)
Tests if a data is visible from current scope.
public mixed get(string $key, mixed $default = null)
Returns data visible from current scope.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Bridge/Twig/NodeVisitor/Scope.html