Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
EndsWithBinary.php
01 <?php
02
03 /*
04 * This file is part of Twig.
05 *
06 * (c) Fabien Potencier
07 *
08 * For the full copyright and license information, please view the LICENSE
09 * file that was distributed with this source code.
10 */
11
12 namespace Twig\Node\Expression\Binary;
13
14 use Twig\Compiler;
15
16 class EndsWithBinary extends AbstractBinary
17 {
18 public function compile(Compiler $compiler)
19 {
20 $left = $compiler->getVarName();
21 $right = $compiler->getVarName();
22 $compiler
23 ->raw(sprintf('(is_string($%s = ', $left))
24 ->subcompile($this->getNode('left'))
25 ->raw(sprintf(') && is_string($%s = ', $right))
26 ->subcompile($this->getNode('right'))
27 ->raw(sprintf(') && (\'\' === $%2$s || $%2$s === substr($%1$s, -strlen($%2$s))))', $left, $right))
28 ;
29 }
30
31 public function operator(Compiler $compiler)
32 {
33 return $compiler->raw('');
34 }
35 }
36
37 class_alias('Twig\Node\Expression\Binary\EndsWithBinary', 'Twig_Node_Expression_Binary_EndsWith');
38