mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
added @internal when appropriate
This commit is contained in:
@@ -885,6 +885,9 @@ function twig_split_filter(Twig_Environment $env, $value, $delimiter, $limit = n
|
||||
// The '_default' filter is used internally to avoid using the ternary operator
|
||||
// which costs a lot for big contexts (before PHP 5.4). So, on average,
|
||||
// a function call is cheaper.
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function _twig_default_filter($value, $default = '')
|
||||
{
|
||||
if (twig_test_empty($value)) {
|
||||
@@ -982,7 +985,9 @@ function twig_sort_filter($array)
|
||||
return $array;
|
||||
}
|
||||
|
||||
/* used internally */
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function twig_in_filter($value, $compare)
|
||||
{
|
||||
if (is_array($compare)) {
|
||||
@@ -1150,7 +1155,9 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',
|
||||
}
|
||||
}
|
||||
|
||||
/* used internally */
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function twig_escape_filter_is_safe(Twig_Node $filterArgs)
|
||||
{
|
||||
foreach ($filterArgs as $arg) {
|
||||
@@ -1396,7 +1403,9 @@ else {
|
||||
}
|
||||
}
|
||||
|
||||
/* used internally */
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function twig_ensure_traversable($seq)
|
||||
{
|
||||
if ($seq instanceof Traversable || is_array($seq)) {
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
* This class is used by Twig_Environment as a staging area and must not be used directly.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class Twig_Extension_Staging extends Twig_Extension
|
||||
{
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
*
|
||||
* @deprecated since 1.18.1 (to be removed in 2.0)
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class Twig_Loader_String implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
|
||||
|
||||
@@ -61,6 +61,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
* @param array $context
|
||||
*
|
||||
* @return Twig_TemplateInterface|false The parent template or false if there is no parent
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function getParent(array $context)
|
||||
{
|
||||
@@ -111,6 +113,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
* @param string $name The block name to display from the parent
|
||||
* @param array $context The context
|
||||
* @param array $blocks The current set of blocks
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function displayParentBlock($name, array $context, array $blocks = array())
|
||||
{
|
||||
@@ -135,6 +139,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
* @param array $context The context
|
||||
* @param array $blocks The current set of blocks
|
||||
* @param bool $useBlocks Whether to use the current set of blocks
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function displayBlock($name, array $context, array $blocks = array(), $useBlocks = true)
|
||||
{
|
||||
@@ -191,6 +197,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
* @param array $blocks The current set of blocks
|
||||
*
|
||||
* @return string The rendered block
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function renderParentBlock($name, array $context, array $blocks = array())
|
||||
{
|
||||
@@ -212,6 +220,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
* @param bool $useBlocks Whether to use the current set of blocks
|
||||
*
|
||||
* @return string The rendered block
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function renderBlock($name, array $context, array $blocks = array(), $useBlocks = true)
|
||||
{
|
||||
@@ -237,6 +247,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
* @param string $name The block name
|
||||
*
|
||||
* @return bool true if the block exists, false otherwise
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function hasBlock($name)
|
||||
{
|
||||
@@ -252,6 +264,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
* @return array An array of block names
|
||||
*
|
||||
* @see hasBlock
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function getBlockNames()
|
||||
{
|
||||
@@ -298,6 +312,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
* @return array An array of blocks
|
||||
*
|
||||
* @see hasBlock
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function getBlocks()
|
||||
{
|
||||
@@ -407,6 +423,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
* @return mixed The content of the context variable
|
||||
*
|
||||
* @throws Twig_Error_Runtime if the variable does not exist and Twig is running in strict mode
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final protected function getContext($context, $item, $ignoreStrictCheck = false)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user