* some changes

* moved some admin html code from php to twig templates (.html files)
* minimum PHP version required by installer is now 5.1.2, cause of spl_autoload_register functon.
* depracated Twig to version 1.20.0 cause of Autoloader
* removed unused admin stylish template
This commit is contained in:
slawkens
2017-08-28 10:02:49 +02:00
parent 603c2175e3
commit 15961f0c17
418 changed files with 15624 additions and 4322 deletions

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary');
if (\false) {
class AbstractBinary extends \Twig_Node_Expression_Binary
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
* (c) 2009 Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Add extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('+');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Add');
if (\false) {
class AddBinary extends \Twig_Node_Expression_Binary_Add
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
* (c) 2009 Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_And extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('&&');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_And');
if (\false) {
class AndBinary extends \Twig_Node_Expression_Binary_And
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
* (c) 2009 Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_BitwiseAnd extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('&');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_BitwiseAnd');
if (\false) {
class BitwiseAndBinary extends \Twig_Node_Expression_Binary_BitwiseAnd
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
* (c) 2009 Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_BitwiseOr extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('|');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_BitwiseOr');
if (\false) {
class BitwiseOrBinary extends \Twig_Node_Expression_Binary_BitwiseOr
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
* (c) 2009 Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_BitwiseXor extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('^');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_BitwiseXor');
if (\false) {
class BitwiseXorBinary extends \Twig_Node_Expression_Binary_BitwiseXor
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
* (c) 2009 Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Concat extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('.');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Concat');
if (\false) {
class ConcatBinary extends \Twig_Node_Expression_Binary_Concat
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
* (c) 2009 Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Div extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('/');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Div');
if (\false) {
class DivBinary extends \Twig_Node_Expression_Binary_Div
{
}
}

View File

@@ -0,0 +1,30 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2013 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_EndsWith extends Twig_Node_Expression_Binary
{
public function compile(Twig_Compiler $compiler)
{
$left = $compiler->getVarName();
$right = $compiler->getVarName();
$compiler
->raw(sprintf('(is_string($%s = ', $left))
->subcompile($this->getNode('left'))
->raw(sprintf(') && is_string($%s = ', $right))
->subcompile($this->getNode('right'))
->raw(sprintf(') && (\'\' === $%2$s || $%2$s === substr($%1$s, -strlen($%2$s))))', $left, $right))
;
}
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_EndsWith');
if (\false) {
class EndsWithBinary extends \Twig_Node_Expression_Binary_EndsWith
{
}
}

View File

@@ -0,0 +1,17 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2010 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Equal extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('==');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Equal');
if (\false) {
class EqualBinary extends \Twig_Node_Expression_Binary_Equal
{
}
}

View File

@@ -0,0 +1,29 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_FloorDiv extends Twig_Node_Expression_Binary
{
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler $compiler A Twig_Compiler instance
*/
public function compile(Twig_Compiler $compiler)
{
$compiler->raw('intval(floor(');
parent::compile($compiler);
$compiler->raw('))');
}
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('/');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_FloorDiv');
if (\false) {
class FloorDivBinary extends \Twig_Node_Expression_Binary_FloorDiv
{
}
}

View File

@@ -0,0 +1,17 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2010 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Greater extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('>');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Greater');
if (\false) {
class GreaterBinary extends \Twig_Node_Expression_Binary_Greater
{
}
}

View File

@@ -0,0 +1,17 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2010 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_GreaterEqual extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('>=');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_GreaterEqual');
if (\false) {
class GreaterEqualBinary extends \Twig_Node_Expression_Binary_GreaterEqual
{
}
}

View File

@@ -0,0 +1,33 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2010 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_In extends Twig_Node_Expression_Binary
{
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler $compiler A Twig_Compiler instance
*/
public function compile(Twig_Compiler $compiler)
{
$compiler
->raw('twig_in_filter(')
->subcompile($this->getNode('left'))
->raw(', ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('in');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_In');
if (\false) {
class InBinary extends \Twig_Node_Expression_Binary_In
{
}
}

View File

@@ -0,0 +1,17 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2010 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Less extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('<');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Less');
if (\false) {
class LessBinary extends \Twig_Node_Expression_Binary_Less
{
}
}

View File

@@ -0,0 +1,17 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2010 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_LessEqual extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('<=');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_LessEqual');
if (\false) {
class LessEqualBinary extends \Twig_Node_Expression_Binary_LessEqual
{
}
}

View File

@@ -0,0 +1,28 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2013 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Matches extends Twig_Node_Expression_Binary
{
public function compile(Twig_Compiler $compiler)
{
$compiler
->raw('preg_match(')
->subcompile($this->getNode('right'))
->raw(', ')
->subcompile($this->getNode('left'))
->raw(')')
;
}
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Matches');
if (\false) {
class MatchesBinary extends \Twig_Node_Expression_Binary_Matches
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
* (c) 2009 Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Mod extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('%');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Mod');
if (\false) {
class ModBinary extends \Twig_Node_Expression_Binary_Mod
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
* (c) 2009 Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Mul extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('*');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Mul');
if (\false) {
class MulBinary extends \Twig_Node_Expression_Binary_Mul
{
}
}

View File

@@ -0,0 +1,17 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2010 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_NotEqual extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('!=');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_NotEqual');
if (\false) {
class NotEqualBinary extends \Twig_Node_Expression_Binary_NotEqual
{
}
}

View File

@@ -0,0 +1,33 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2010 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_NotIn extends Twig_Node_Expression_Binary
{
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler $compiler A Twig_Compiler instance
*/
public function compile(Twig_Compiler $compiler)
{
$compiler
->raw('!twig_in_filter(')
->subcompile($this->getNode('left'))
->raw(', ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('not in');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_NotIn');
if (\false) {
class NotInBinary extends \Twig_Node_Expression_Binary_NotIn
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
* (c) 2009 Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Or extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('||');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Or');
if (\false) {
class OrBinary extends \Twig_Node_Expression_Binary_Or
{
}
}

View File

@@ -0,0 +1,33 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2010 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Power extends Twig_Node_Expression_Binary
{
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler $compiler A Twig_Compiler instance
*/
public function compile(Twig_Compiler $compiler)
{
$compiler
->raw('pow(')
->subcompile($this->getNode('left'))
->raw(', ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('**');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Power');
if (\false) {
class PowerBinary extends \Twig_Node_Expression_Binary_Power
{
}
}

View File

@@ -0,0 +1,33 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2010 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Range extends Twig_Node_Expression_Binary
{
/**
* Compiles the node to PHP.
*
* @param Twig_Compiler $compiler A Twig_Compiler instance
*/
public function compile(Twig_Compiler $compiler)
{
$compiler
->raw('range(')
->subcompile($this->getNode('left'))
->raw(', ')
->subcompile($this->getNode('right'))
->raw(')')
;
}
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('..');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Range');
if (\false) {
class RangeBinary extends \Twig_Node_Expression_Binary_Range
{
}
}

View File

@@ -0,0 +1,30 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2013 Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_StartsWith extends Twig_Node_Expression_Binary
{
public function compile(Twig_Compiler $compiler)
{
$left = $compiler->getVarName();
$right = $compiler->getVarName();
$compiler
->raw(sprintf('(is_string($%s = ', $left))
->subcompile($this->getNode('left'))
->raw(sprintf(') && is_string($%s = ', $right))
->subcompile($this->getNode('right'))
->raw(sprintf(') && (\'\' === $%2$s || 0 === strpos($%1$s, $%2$s)))', $left, $right))
;
}
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_StartsWith');
if (\false) {
class StartsWithBinary extends \Twig_Node_Expression_Binary_StartsWith
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
/*
* This file is part of Twig.
*
* (c) 2009 Fabien Potencier
* (c) 2009 Armin Ronacher
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Twig_Node_Expression_Binary_Sub extends Twig_Node_Expression_Binary
{
public function operator(Twig_Compiler $compiler)
{
return $compiler->raw('-');
}
}

View File

@@ -1,11 +0,0 @@
<?php
namespace Twig\Node\Expression\Binary;
class_exists('Twig_Node_Expression_Binary_Sub');
if (\false) {
class SubBinary extends \Twig_Node_Expression_Binary_Sub
{
}
}