mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-13 07:15:51 +00:00
32 lines
569 B
PHP
32 lines
569 B
PHP
<?php
|
|
|
|
namespace Twig\Node;
|
|
|
|
use Twig\Attribute\YieldReady;
|
|
use Twig\Compiler;
|
|
|
|
/**
|
|
* Represents a types node.
|
|
*
|
|
* @author Jeroen Versteeg <jeroen@alisqi.com>
|
|
*/
|
|
#[YieldReady]
|
|
class TypesNode extends Node
|
|
{
|
|
/**
|
|
* @param array<string, array{type: string, optional: bool}> $types
|
|
*/
|
|
public function __construct(array $types, int $lineno)
|
|
{
|
|
parent::__construct([], ['mapping' => $types], $lineno);
|
|
}
|
|
|
|
/**
|
|
* @return void
|
|
*/
|
|
public function compile(Compiler $compiler)
|
|
{
|
|
// Don't compile anything.
|
|
}
|
|
}
|