mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-04 06:30:57 +00:00
Use class_exists instead of require to play nice with inlining
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/Environment.php';
|
class_exists('Twig_Environment');
|
||||||
require_once __DIR__.'/Node.php';
|
class_exists('Twig_Node');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Twig_BaseNodeVisitor can be used to make node visitors compatible with Twig 1.x and 2.x.
|
* Twig_BaseNodeVisitor can be used to make node visitors compatible with Twig 1.x and 2.x.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/Node.php';
|
class_exists('Twig_Node');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compiles a node to PHP code.
|
* Compiles a node to PHP code.
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/Source.php';
|
class_exists('Twig_Source');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Twig base exception.
|
* Twig base exception.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/Environment.php';
|
class_exists('Twig_Environment');
|
||||||
|
|
||||||
abstract class Twig_Extension implements Twig_ExtensionInterface
|
abstract class Twig_Extension implements Twig_ExtensionInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/../Profiler/Profile.php';
|
class_exists('Twig_Profiler_Profile');
|
||||||
|
|
||||||
class Twig_Extension_Profiler extends Twig_Extension
|
class Twig_Extension_Profiler extends Twig_Extension
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/Environment.php';
|
class_exists('Twig_Environment');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface implemented by extension classes.
|
* Interface implemented by extension classes.
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/Compiler.php';
|
class_exists('Twig_Compiler');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a node in the AST.
|
* Represents a node in the AST.
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/Environment.php';
|
class_exists('Twig_Environment');
|
||||||
require_once __DIR__.'/Node.php';
|
class_exists('Twig_Node');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Twig_NodeVisitorInterface is the interface the all node visitor classes must implement.
|
* Twig_NodeVisitorInterface is the interface the all node visitor classes must implement.
|
||||||
|
|||||||
+2
-2
@@ -10,8 +10,8 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/Node.php';
|
class_exists('Twig_Node');
|
||||||
require_once __DIR__.'/TokenStream.php';
|
class_exists('Twig_TokenStream');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default parser implementation.
|
* Default parser implementation.
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/../Environment.php';
|
class_exists('Twig_Environment');
|
||||||
require_once __DIR__.'/../Node.php';
|
class_exists('Twig_Node');
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/Parser.php';
|
class_exists('Twig_Parser');
|
||||||
require_once __DIR__.'/Token.php';
|
class_exists('Twig_Token');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface implemented by token parsers.
|
* Interface implemented by token parsers.
|
||||||
|
|||||||
Reference in New Issue
Block a user