mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-30 12:06:56 +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.
|
||||
*/
|
||||
|
||||
require_once __DIR__.'/Environment.php';
|
||||
require_once __DIR__.'/Node.php';
|
||||
class_exists('Twig_Environment');
|
||||
class_exists('Twig_Node');
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
require_once __DIR__.'/Node.php';
|
||||
class_exists('Twig_Node');
|
||||
|
||||
/**
|
||||
* Compiles a node to PHP code.
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require_once __DIR__.'/Source.php';
|
||||
class_exists('Twig_Source');
|
||||
|
||||
/**
|
||||
* Twig base exception.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require_once __DIR__.'/Environment.php';
|
||||
class_exists('Twig_Environment');
|
||||
|
||||
abstract class Twig_Extension implements Twig_ExtensionInterface
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* 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
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require_once __DIR__.'/Environment.php';
|
||||
class_exists('Twig_Environment');
|
||||
|
||||
/**
|
||||
* Interface implemented by extension classes.
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require_once __DIR__.'/Compiler.php';
|
||||
class_exists('Twig_Compiler');
|
||||
|
||||
/**
|
||||
* Represents a node in the AST.
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require_once __DIR__.'/Environment.php';
|
||||
require_once __DIR__.'/Node.php';
|
||||
class_exists('Twig_Environment');
|
||||
class_exists('Twig_Node');
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
require_once __DIR__.'/Node.php';
|
||||
require_once __DIR__.'/TokenStream.php';
|
||||
class_exists('Twig_Node');
|
||||
class_exists('Twig_TokenStream');
|
||||
|
||||
/**
|
||||
* Default parser implementation.
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require_once __DIR__.'/../Environment.php';
|
||||
require_once __DIR__.'/../Node.php';
|
||||
class_exists('Twig_Environment');
|
||||
class_exists('Twig_Node');
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require_once __DIR__.'/Parser.php';
|
||||
require_once __DIR__.'/Token.php';
|
||||
class_exists('Twig_Parser');
|
||||
class_exists('Twig_Token');
|
||||
|
||||
/**
|
||||
* Interface implemented by token parsers.
|
||||
|
||||
Reference in New Issue
Block a user