Home
last modified time | relevance | path

Searched refs:callable (Results 1 – 14 of 14) sorted by relevance

/template/twigstarter/vendor/twig/twig/src/Util/
DReflectionCallable.php24 private $callable; variable in Twig\\Util\\ReflectionCallable
30 $callable = $twigCallable->getCallable();
31 if (\is_string($callable) && false !== $pos = strpos($callable, '::')) {
32 $callable = [substr($callable, 0, $pos), substr($callable, 2 + $pos)];
35 if (\is_array($callable) && method_exists($callable[0], $callable[1])) {
36 $this->reflector = $r = new \ReflectionMethod($callable[0], $callable[1]);
37 $this->callable = $callable;
43 $checkVisibility = $callable instanceof \Closure;
45 $closure = \Closure::fromCallable($callable);
52 $this->callable = $callable;
[all …]
DCallableArgumentsExtractor.php68 if (!$callable = $this->twigCallable->getCallable()) {
84 if (\PHP_VERSION_ID >= 80000 && 'range' === $callable) {
/template/twigstarter/vendor/twig/twig/src/Node/Expression/
DCallExpression.php35 $callable = $twigCallable->getCallable();
37 if (\is_string($callable) && !str_contains($callable, '::')) {
38 $compiler->raw($callable);
42 $callable = $rc->getCallable();
44 if (\is_string($callable)) {
45 $compiler->raw($callable);
46 } elseif (\is_array($callable) && \is_string($callable[0])) {
48 $compiler->raw(\sprintf('%s::%s', $callable[0], $callable[1]));
50 … $compiler->raw(\sprintf('$this->env->getRuntime(\'%s\')->%s', $callable[0], $callable[1]));
52 } elseif (\is_array($callable) && $callable[0] instanceof ExtensionInterface) {
[all …]
/template/twigstarter/vendor/twig/twig/src/Extension/
DAttributeExtension.php94 … $callable = new TwigFilter($attribute->name, [$reflectionClass->name, $method->getName()], [
107 … if ($callable->getMinimalNumberOfRequiredArguments() > $method->getNumberOfParameters()) {
108 …ut only %d defined.', $reflectionClass->getName(), $method->getName(), $callable->getMinimalNumber…
111 $filters[$attribute->name] = $callable;
118 … $callable = new TwigFunction($attribute->name, [$reflectionClass->name, $method->getName()], [
129 … if ($callable->getMinimalNumberOfRequiredArguments() > $method->getNumberOfParameters()) {
130 …ut only %d defined.', $reflectionClass->getName(), $method->getName(), $callable->getMinimalNumber…
133 $functions[$attribute->name] = $callable;
140 … $callable = new TwigTest($attribute->name, [$reflectionClass->name, $method->getName()], [
149 … if ($callable->getMinimalNumberOfRequiredArguments() > $method->getNumberOfParameters()) {
[all …]
DEscaperExtension.php139 public function setEscaper($strategy, callable $callable) argument
145 $this->escapers[$strategy] = $callable;
146 $callable = function ($string, $charset) use ($callable) {
147 return $callable($this->environment, $string, $charset);
150 $escaper->setEscaper($strategy, $callable);
/template/twigstarter/vendor/twig/twig/src/
DExtensionSet.php220 public function registerUndefinedFunctionCallback(callable $callable): void argument
222 $this->functionCallbacks[] = $callable;
276 public function registerUndefinedFilterCallback(callable $callable): void argument
278 $this->filterCallbacks[] = $callable;
345 public function registerUndefinedTokenParserCallback(callable $callable): void argument
347 $this->parserCallbacks[] = $callable;
431 public function registerUndefinedTestCallback(callable $callable): void argument
433 $this->testCallbacks[] = $callable;
544 …ativity, ?PrecedenceChange $precedenceChange, array $aliases, callable $callable): InfixExpression… argument
548 …, $operator, $precedence, $associativity, $precedenceChange, $aliases, $callable) extends BinaryOp…
[all …]
DTwigTest.php28 public function __construct(string $name, $callable = null, array $options = []) argument
30 parent::__construct($name, $callable, $options);
DTwigFunction.php29 public function __construct(string $name, $callable = null, array $options = []) argument
31 parent::__construct($name, $callable, $options);
DTwigFilter.php29 public function __construct(string $name, $callable = null, array $options = []) argument
31 parent::__construct($name, $callable, $options);
DAbstractTwigCallable.php23 private $callable; variable in Twig\\AbstractTwigCallable
26 public function __construct(string $name, $callable = null, array $options = []) argument
29 $this->callable = $callable;
DEnvironment.php741 public function registerUndefinedTokenParserCallback(callable $callable): void argument
743 $this->extensionSet->registerUndefinedTokenParserCallback($callable);
783 public function registerUndefinedFilterCallback(callable $callable): void argument
785 $this->extensionSet->registerUndefinedFilterCallback($callable);
833 public function registerUndefinedTestCallback(callable $callable): void argument
835 $this->extensionSet->registerUndefinedTestCallback($callable);
857 public function registerUndefinedFunctionCallback(callable $callable): void argument
859 $this->extensionSet->registerUndefinedFunctionCallback($callable);
DParser.php215 … $callable = (new ReflectionCallable(new TwigTest('decision', $test)))->getCallable();
216 … if (\is_array($callable) && $callable[0] instanceof TokenParserInterface) {
217 …ntf(' (expecting closing tag for the "%s" tag defined near line %s).', $callable[0]->getTag(), $li…
/template/twigstarter/vendor/twig/twig/src/Runtime/
DEscaperRuntime.php42 public function setEscaper($strategy, callable $callable) argument
44 $this->escapers[$strategy] = $callable;
/template/twigstarter/vendor/twig/twig/
DCHANGELOG175 …* Deprecate passing a string or an array to Twig callable arguments accepting arrow functions (pas…
188 …* Allow Twig callable argument names to be free-form (snake-case or camelCase) independently of th…
195 …* Improve the way one can deprecate a Twig callable (use `deprecation_info` instead of the other c…
245 …* Throw a SyntaxError exception at compile time when a Twig callable has not the minimum number of…
249 …* Deprecate all Twig callable attributes on `FunctionExpression`, `FilterExpression`, and `TestExp…