Various style cleanups.
* a bunch of small changes, courtesy of styleci * update dates in file headers * add file headers to files that are missing them
This commit is contained in:
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache class autoloader.
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Cache interface.
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Abstract Mustache Cache class.
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Cache filesystem implementation.
|
||||
*
|
||||
@@ -27,8 +28,8 @@ class Mustache_Cache_FilesystemCache extends Mustache_Cache_AbstractCache
|
||||
/**
|
||||
* Filesystem cache constructor.
|
||||
*
|
||||
* @param string $baseDir Directory for compiled templates.
|
||||
* @param int $fileMode Override default permissions for cache files. Defaults to using the system-defined umask.
|
||||
* @param string $baseDir Directory for compiled templates
|
||||
* @param int $fileMode Override default permissions for cache files. Defaults to using the system-defined umask
|
||||
*/
|
||||
public function __construct($baseDir, $fileMode = null)
|
||||
{
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Cache in-memory implementation.
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Compiler class.
|
||||
*
|
||||
@@ -75,7 +76,7 @@ class Mustache_Compiler
|
||||
/**
|
||||
* Helper function for walking the Mustache token parse tree.
|
||||
*
|
||||
* @throws Mustache_Exception_SyntaxException upon encountering unknown token types.
|
||||
* @throws Mustache_Exception_SyntaxException upon encountering unknown token types
|
||||
*
|
||||
* @param array $tree Parse tree of Mustache tokens
|
||||
* @param int $level (default: 0)
|
||||
@@ -493,7 +494,7 @@ class Mustache_Compiler
|
||||
*
|
||||
* @param array $node
|
||||
*
|
||||
* @return bool True if $node is a block arg token.
|
||||
* @return bool True if $node is a block arg token
|
||||
*/
|
||||
private static function onlyBlockArgs(array $node)
|
||||
{
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Template rendering Context.
|
||||
*/
|
||||
@@ -150,7 +151,7 @@ class Mustache_Context
|
||||
*
|
||||
* @see Mustache_Context::findDot
|
||||
*
|
||||
* @throws Mustache_Exception_InvalidArgumentException if given an invalid anchored dot $id.
|
||||
* @throws Mustache_Exception_InvalidArgumentException if given an invalid anchored dot $id
|
||||
*
|
||||
* @param string $id Dotted variable selector
|
||||
*
|
||||
@@ -182,7 +183,7 @@ class Mustache_Context
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
* @return mixed Variable value, or '' if not found.
|
||||
* @return mixed Variable value, or '' if not found
|
||||
*/
|
||||
public function findInBlock($id)
|
||||
{
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A Mustache implementation in PHP.
|
||||
*
|
||||
@@ -126,7 +127,7 @@ class Mustache_Engine
|
||||
* 'pragmas' => [Mustache_Engine::PRAGMA_FILTERS],
|
||||
* );
|
||||
*
|
||||
* @throws Mustache_Exception_InvalidArgumentException If `escape` option is not callable.
|
||||
* @throws Mustache_Exception_InvalidArgumentException If `escape` option is not callable
|
||||
*
|
||||
* @param array $options (default: array())
|
||||
*/
|
||||
@@ -429,7 +430,7 @@ class Mustache_Engine
|
||||
/**
|
||||
* Set the Mustache Logger instance.
|
||||
*
|
||||
* @throws Mustache_Exception_InvalidArgumentException If logger is not an instance of Mustache_Logger or Psr\Log\LoggerInterface.
|
||||
* @throws Mustache_Exception_InvalidArgumentException If logger is not an instance of Mustache_Logger or Psr\Log\LoggerInterface
|
||||
*
|
||||
* @param Mustache_Logger|Psr\Log\LoggerInterface $logger
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A Mustache Exception interface.
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Invalid argument exception.
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Logic exception.
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Runtime exception.
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache syntax exception.
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Unknown filter exception.
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Unknown helper exception.
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Unknown template exception.
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A collection of helpers for a Mustache instance.
|
||||
*/
|
||||
@@ -81,7 +82,7 @@ class Mustache_HelperCollection
|
||||
/**
|
||||
* Get a helper by name.
|
||||
*
|
||||
* @throws Mustache_Exception_UnknownHelperException If helper does not exist.
|
||||
* @throws Mustache_Exception_UnknownHelperException If helper does not exist
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
@@ -137,7 +138,7 @@ class Mustache_HelperCollection
|
||||
/**
|
||||
* Check whether a given helper is present in the collection.
|
||||
*
|
||||
* @throws Mustache_Exception_UnknownHelperException if the requested helper is not present.
|
||||
* @throws Mustache_Exception_UnknownHelperException if the requested helper is not present
|
||||
*
|
||||
* @param string $name
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Lambda Helper.
|
||||
*
|
||||
@@ -25,8 +26,8 @@ class Mustache_LambdaHelper
|
||||
/**
|
||||
* Mustache Lambda Helper constructor.
|
||||
*
|
||||
* @param Mustache_Engine $mustache Mustache engine instance.
|
||||
* @param Mustache_Context $context Rendering context.
|
||||
* @param Mustache_Engine $mustache Mustache engine instance
|
||||
* @param Mustache_Context $context Rendering context
|
||||
* @param string $delims Optional custom delimiters, in the format `{{= <% %> =}}`. (default: null)
|
||||
*/
|
||||
public function __construct(Mustache_Engine $mustache, Mustache_Context $context, $delims = null)
|
||||
@@ -41,7 +42,7 @@ class Mustache_LambdaHelper
|
||||
*
|
||||
* @param string $string
|
||||
*
|
||||
* @return string Rendered template.
|
||||
* @return string Rendered template
|
||||
*/
|
||||
public function render($string)
|
||||
{
|
||||
@@ -65,7 +66,7 @@ class Mustache_LambdaHelper
|
||||
/**
|
||||
* Get a Lambda Helper with custom delimiters.
|
||||
*
|
||||
* @param string $delims Custom delimiters, in the format `{{= <% %> =}}`.
|
||||
* @param string $delims Custom delimiters, in the format `{{= <% %> =}}`
|
||||
*
|
||||
* @return Mustache_LambdaHelper
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Template Loader interface.
|
||||
*/
|
||||
@@ -17,7 +18,7 @@ interface Mustache_Loader
|
||||
/**
|
||||
* Load a Template by name.
|
||||
*
|
||||
* @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
|
||||
* @throws Mustache_Exception_UnknownTemplateException If a template file is not found
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Template array Loader implementation.
|
||||
*
|
||||
@@ -41,7 +42,7 @@ class Mustache_Loader_ArrayLoader implements Mustache_Loader, Mustache_Loader_Mu
|
||||
/**
|
||||
* Load a Template.
|
||||
*
|
||||
* @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
|
||||
* @throws Mustache_Exception_UnknownTemplateException If a template file is not found
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A Mustache Template cascading loader implementation, which delegates to other
|
||||
* Loader instances.
|
||||
@@ -48,7 +49,7 @@ class Mustache_Loader_CascadingLoader implements Mustache_Loader
|
||||
/**
|
||||
* Load a Template by name.
|
||||
*
|
||||
* @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
|
||||
* @throws Mustache_Exception_UnknownTemplateException If a template file is not found
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Template filesystem Loader implementation.
|
||||
*
|
||||
@@ -40,9 +41,9 @@ class Mustache_Loader_FilesystemLoader implements Mustache_Loader
|
||||
* 'extension' => '.ms',
|
||||
* );
|
||||
*
|
||||
* @throws Mustache_Exception_RuntimeException if $baseDir does not exist.
|
||||
* @throws Mustache_Exception_RuntimeException if $baseDir does not exist
|
||||
*
|
||||
* @param string $baseDir Base directory containing Mustache template files.
|
||||
* @param string $baseDir Base directory containing Mustache template files
|
||||
* @param array $options Array of Loader options (default: array())
|
||||
*/
|
||||
public function __construct($baseDir, array $options = array())
|
||||
@@ -88,7 +89,7 @@ class Mustache_Loader_FilesystemLoader implements Mustache_Loader
|
||||
/**
|
||||
* Helper function for loading a Mustache file by name.
|
||||
*
|
||||
* @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
|
||||
* @throws Mustache_Exception_UnknownTemplateException If a template file is not found
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A Mustache Template loader for inline templates.
|
||||
*
|
||||
@@ -68,7 +69,7 @@ class Mustache_Loader_InlineLoader implements Mustache_Loader
|
||||
* @param string $fileName The file to parse for inline templates
|
||||
* @param int $offset A string offset for the start of the templates.
|
||||
* This usually coincides with the `__halt_compiler`
|
||||
* call, and the `__COMPILER_HALT_OFFSET__`.
|
||||
* call, and the `__COMPILER_HALT_OFFSET__`
|
||||
*/
|
||||
public function __construct($fileName, $offset)
|
||||
{
|
||||
@@ -87,7 +88,7 @@ class Mustache_Loader_InlineLoader implements Mustache_Loader
|
||||
/**
|
||||
* Load a Template by name.
|
||||
*
|
||||
* @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
|
||||
* @throws Mustache_Exception_UnknownTemplateException If a template file is not found
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Template mutable Loader interface.
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Template string Loader implementation.
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Describes a Mustache logger instance.
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* This is a simple Logger implementation that other Loggers can inherit from.
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A Mustache Stream Logger.
|
||||
*
|
||||
@@ -36,7 +37,7 @@ class Mustache_Logger_StreamLogger extends Mustache_Logger_AbstractLogger
|
||||
protected $url = null;
|
||||
|
||||
/**
|
||||
* @throws InvalidArgumentException if the logging level is unknown.
|
||||
* @throws InvalidArgumentException if the logging level is unknown
|
||||
*
|
||||
* @param resource|string $stream Resource instance or URL
|
||||
* @param int $level The minimum logging level at which this handler will be triggered
|
||||
@@ -65,7 +66,7 @@ class Mustache_Logger_StreamLogger extends Mustache_Logger_AbstractLogger
|
||||
/**
|
||||
* Set the minimum logging level.
|
||||
*
|
||||
* @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown.
|
||||
* @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown
|
||||
*
|
||||
* @param int $level The minimum logging level which will be written
|
||||
*/
|
||||
@@ -91,7 +92,7 @@ class Mustache_Logger_StreamLogger extends Mustache_Logger_AbstractLogger
|
||||
/**
|
||||
* Logs with an arbitrary level.
|
||||
*
|
||||
* @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown.
|
||||
* @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown
|
||||
*
|
||||
* @param mixed $level
|
||||
* @param string $message
|
||||
@@ -111,8 +112,8 @@ class Mustache_Logger_StreamLogger extends Mustache_Logger_AbstractLogger
|
||||
/**
|
||||
* Write a record to the log.
|
||||
*
|
||||
* @throws Mustache_Exception_LogicException If neither a stream resource nor url is present.
|
||||
* @throws Mustache_Exception_RuntimeException If the stream url cannot be opened.
|
||||
* @throws Mustache_Exception_LogicException If neither a stream resource nor url is present
|
||||
* @throws Mustache_Exception_RuntimeException If the stream url cannot be opened
|
||||
*
|
||||
* @param int $level The logging level
|
||||
* @param string $message The log message
|
||||
@@ -139,7 +140,7 @@ class Mustache_Logger_StreamLogger extends Mustache_Logger_AbstractLogger
|
||||
/**
|
||||
* Gets the name of the logging level.
|
||||
*
|
||||
* @throws InvalidArgumentException if the logging level is unknown.
|
||||
* @throws InvalidArgumentException if the logging level is unknown
|
||||
*
|
||||
* @param int $level
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Parser class.
|
||||
*
|
||||
@@ -63,7 +64,7 @@ class Mustache_Parser
|
||||
/**
|
||||
* Helper method for recursively building a parse tree.
|
||||
*
|
||||
* @throws Mustache_Exception_SyntaxException when nesting errors or mismatched section tags are encountered.
|
||||
* @throws Mustache_Exception_SyntaxException when nesting errors or mismatched section tags are encountered
|
||||
*
|
||||
* @param array &$tokens Set of Mustache tokens
|
||||
* @param array $parent Parent token (default: null)
|
||||
@@ -195,10 +196,10 @@ class Mustache_Parser
|
||||
*
|
||||
* Returns a whitespace token for indenting partials, if applicable.
|
||||
*
|
||||
* @param array $nodes Parsed nodes.
|
||||
* @param array $tokens Tokens to be parsed.
|
||||
* @param array $nodes Parsed nodes
|
||||
* @param array $tokens Tokens to be parsed
|
||||
*
|
||||
* @return array|null Resulting indent token, if any.
|
||||
* @return array|null Resulting indent token, if any
|
||||
*/
|
||||
private function clearStandaloneLines(array &$nodes, array &$tokens)
|
||||
{
|
||||
@@ -268,7 +269,7 @@ class Mustache_Parser
|
||||
/**
|
||||
* Check whether a token is allowed inside a parent tag.
|
||||
*
|
||||
* @throws Mustache_Exception_SyntaxException if an invalid token is found inside a parent tag.
|
||||
* @throws Mustache_Exception_SyntaxException if an invalid token is found inside a parent tag
|
||||
*
|
||||
* @param array|null $parent
|
||||
* @param array $token
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Abstract Mustache Template class.
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Mustache Tokenizer class.
|
||||
*
|
||||
@@ -80,7 +81,7 @@ class Mustache_Tokenizer
|
||||
/**
|
||||
* Scan and tokenize template source.
|
||||
*
|
||||
* @throws Mustache_Exception_SyntaxException when mismatched section tags are encountered.
|
||||
* @throws Mustache_Exception_SyntaxException when mismatched section tags are encountered
|
||||
*
|
||||
* @param string $text Mustache template source to tokenize
|
||||
* @param string $delimiters Optionally, pass initial opening and closing delimiters (default: null)
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
class Mustache_Test_Cache_AbstractCacheTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testGetSetLogger()
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group functional
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
class Mustache_Test_Exception_SyntaxExceptionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testInstance()
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
class Mustache_Test_Exception_UnknownFilterExceptionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testInstance()
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
class Mustache_Test_Exception_UnknownHelperExceptionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testInstance()
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
class Mustache_Test_Exception_UnknownTemplateExceptionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testInstance()
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group lambdas
|
||||
* @group functional
|
||||
@@ -25,6 +26,8 @@ class Mustache_Test_FiveThree_Functional_ClosureQuirksTest extends PHPUnit_Frame
|
||||
public function testClosuresDontLikeItWhenYouTouchTheirProperties()
|
||||
{
|
||||
$tpl = $this->mustache->loadTemplate('{{ foo.bar }}');
|
||||
$this->assertEquals('', $tpl->render(array('foo' => function () { return 'FOO'; })));
|
||||
$this->assertEquals('', $tpl->render(array('foo' => function () {
|
||||
return 'FOO';
|
||||
})));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group pragmas
|
||||
* @group functional
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group filters
|
||||
* @group functional
|
||||
@@ -143,21 +144,45 @@ EOS;
|
||||
array('{{% FILTERS }}{{ foo | bar }}', array('foo' => 'FOO')),
|
||||
array('{{% FILTERS }}{{ foo | bar }}', array('foo' => 'FOO', 'bar' => 'BAR')),
|
||||
array('{{% FILTERS }}{{ foo | bar }}', array('foo' => 'FOO', 'bar' => array(1, 2))),
|
||||
array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () { return 'BAR'; })),
|
||||
array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () { return 'BAZ'; })),
|
||||
array('{{% FILTERS }}{{ foo | bar | baz }}', array('bar' => function () { return 'BAR'; })),
|
||||
array('{{% FILTERS }}{{ foo | bar | baz }}', array('baz' => function () { return 'BAZ'; })),
|
||||
array('{{% FILTERS }}{{ foo | bar.baz }}', array('foo' => 'FOO', 'bar' => function () { return 'BAR'; }, 'baz' => function () { return 'BAZ'; })),
|
||||
array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () {
|
||||
return 'BAR';
|
||||
})),
|
||||
array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () {
|
||||
return 'BAZ';
|
||||
})),
|
||||
array('{{% FILTERS }}{{ foo | bar | baz }}', array('bar' => function () {
|
||||
return 'BAR';
|
||||
})),
|
||||
array('{{% FILTERS }}{{ foo | bar | baz }}', array('baz' => function () {
|
||||
return 'BAZ';
|
||||
})),
|
||||
array('{{% FILTERS }}{{ foo | bar.baz }}', array('foo' => 'FOO', 'bar' => function () {
|
||||
return 'BAR';
|
||||
}, 'baz' => function () {
|
||||
return 'BAZ';
|
||||
})),
|
||||
|
||||
array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', array()),
|
||||
array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', array('foo' => 'FOO')),
|
||||
array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', array('foo' => 'FOO', 'bar' => 'BAR')),
|
||||
array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', array('foo' => 'FOO', 'bar' => array(1, 2))),
|
||||
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () { return 'BAR'; })),
|
||||
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () { return 'BAZ'; })),
|
||||
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('bar' => function () { return 'BAR'; })),
|
||||
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('baz' => function () { return 'BAZ'; })),
|
||||
array('{{% FILTERS }}{{# foo | bar.baz }}{{ . }}{{/ foo | bar.baz }}', array('foo' => 'FOO', 'bar' => function () { return 'BAR'; }, 'baz' => function () { return 'BAZ'; })),
|
||||
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () {
|
||||
return 'BAR';
|
||||
})),
|
||||
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () {
|
||||
return 'BAZ';
|
||||
})),
|
||||
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('bar' => function () {
|
||||
return 'BAR';
|
||||
})),
|
||||
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('baz' => function () {
|
||||
return 'BAZ';
|
||||
})),
|
||||
array('{{% FILTERS }}{{# foo | bar.baz }}{{ . }}{{/ foo | bar.baz }}', array('foo' => 'FOO', 'bar' => function () {
|
||||
return 'BAR';
|
||||
}, 'baz' => function () {
|
||||
return 'BAZ';
|
||||
})),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group lambdas
|
||||
* @group functional
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group lambdas
|
||||
* @group functional
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A PHPUnit test case wrapping the Mustache Spec.
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group lambdas
|
||||
* @group functional
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group lambdas
|
||||
* @group functional
|
||||
@@ -52,7 +53,9 @@ class Mustache_Test_FiveThree_Functional_StrictCallablesTest extends PHPUnit_Fra
|
||||
),
|
||||
array(
|
||||
false,
|
||||
function () { return 'Yoshi'; },
|
||||
function () {
|
||||
return 'Yoshi';
|
||||
},
|
||||
$lambda,
|
||||
'YOSHI',
|
||||
),
|
||||
@@ -80,7 +83,9 @@ class Mustache_Test_FiveThree_Functional_StrictCallablesTest extends PHPUnit_Fra
|
||||
// Strict interpolation lambdas
|
||||
array(
|
||||
true,
|
||||
function () { return 'Yoshi'; },
|
||||
function () {
|
||||
return 'Yoshi';
|
||||
},
|
||||
$lambda,
|
||||
'YOSHI',
|
||||
),
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group magic_methods
|
||||
* @group functional
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group examples
|
||||
* @group functional
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group lambdas
|
||||
* @group functional
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @group inheritance
|
||||
* @group functional
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group mustache_injection
|
||||
* @group functional
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A PHPUnit test case wrapping the Mustache Spec.
|
||||
*
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group functional
|
||||
* @group partials
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group sections
|
||||
* @group functional
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
abstract class Mustache_Test_FunctionalTestCase extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
protected static $tempDir;
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
class Mustache_Test_HelperCollectionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testConstructor()
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
abstract class Mustache_Test_SpecTestCase extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
protected static $mustache;
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @group unit
|
||||
*/
|
||||
|
||||
+2
-1
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
require dirname(__FILE__) . '/../src/Mustache/Autoloader.php';
|
||||
Mustache_Autoloader::register();
|
||||
Mustache_Autoloader::register(dirname(__FILE__) . '/../test');
|
||||
|
||||
+2
-1
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
class Mustache_Bar
|
||||
{
|
||||
// nada
|
||||
|
||||
+2
-1
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
class Mustache_Foo
|
||||
{
|
||||
// nada
|
||||
|
||||
+2
-1
@@ -3,12 +3,13 @@
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2015 Justin Hileman
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
|
||||
class NonMustacheClass
|
||||
{
|
||||
// noop
|
||||
|
||||
+9
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Blocks
|
||||
{
|
||||
public $items = array(1, 2, 3);
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class ChildContext
|
||||
{
|
||||
public $parent = array(
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Comments
|
||||
{
|
||||
public function title()
|
||||
|
||||
+9
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Complex
|
||||
{
|
||||
public $header = 'Colors';
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Delimiters
|
||||
{
|
||||
public $start = 'It worked the first time.';
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class DotNotation
|
||||
{
|
||||
public $person = array(
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class DoubleSection
|
||||
{
|
||||
public function t()
|
||||
|
||||
+9
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Escaped
|
||||
{
|
||||
public $title = '"Bear" > "Shark"';
|
||||
|
||||
+9
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Filters
|
||||
{
|
||||
public $states = array(
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class GrandParentContext
|
||||
{
|
||||
public $grand_parent_id = 'grand_parent1';
|
||||
|
||||
Vendored
+9
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class I18n
|
||||
{
|
||||
// Variable to be interpolated
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class ImplicitIterator
|
||||
{
|
||||
public $data = array('Donkey Kong', 'Luigi', 'Mario', 'Peach', 'Yoshi');
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class InvertedDoubleSection
|
||||
{
|
||||
public $t = false;
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class InvertedSection
|
||||
{
|
||||
public $repo = array();
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class NestedPartials
|
||||
{
|
||||
public $val = 'FOURTH!';
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Partials
|
||||
{
|
||||
public $page = array(
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class RecursivePartials
|
||||
{
|
||||
public $name = 'George';
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class SectionIteratorObjects
|
||||
{
|
||||
public $start = 'It worked the first time.';
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class SectionMagicObjects
|
||||
{
|
||||
public $start = 'It worked the first time.';
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class SectionObjects
|
||||
{
|
||||
public $start = 'It worked the first time.';
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Sections
|
||||
{
|
||||
public $start = 'It worked the first time.';
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class SectionsNested
|
||||
{
|
||||
public $name = 'Little Mac';
|
||||
|
||||
+9
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Simple
|
||||
{
|
||||
public $name = 'Chris';
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Unescaped
|
||||
{
|
||||
public $title = 'Bear > Shark';
|
||||
|
||||
Vendored
+9
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class UTF8
|
||||
{
|
||||
public $test = '中文又来啦';
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class UTF8Unescaped
|
||||
{
|
||||
public $test = '中文又来啦';
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Mustache.php.
|
||||
*
|
||||
* (c) 2010-2016 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Whitespace test for tag names.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user