Functions

twig_cycle

Cycles over a value.

« More »

twig_random

Returns a random value depending on the supplied parameter type: - a random item from a Traversable or array - a random character from a string - a random integer between 0 and the integer parameter.

« More »

twig_date_format_filter

Converts a date to the given format.

<pre> {{ post.published_at|date("m/d/Y") }} </pre>
« More »

twig_date_modify_filter

Returns a new date object modified.

<pre> {{ post.published_at|date_modify("-1day")|date("m/d/Y") }} </pre>
« More »

twig_date_converter

Converts an input to a DateTime instance.

<pre> {% if date(user.created_at) < date('+2days') %} {# do something #} {% endif %} </pre>
« More »

twig_replace_filter

Replaces strings within a string.

« More »

twig_round

Rounds a number.

« More »

twig_number_format_filter

Number format filter.

All of the formatting options can be left null, in that case the defaults will be used. Supplying any of the parameters will override the defaults set in the environment object.
« More »

twig_urlencode_filter

URL encodes (RFC 3986) a string as a path segment or an array as a query string.

« More »

twig_jsonencode_filter

JSON encodes a variable.

« More »

twig_array_merge

Merges an array with another one.

<pre> {% set items = { 'apple': 'fruit', 'orange': 'fruit' } %} {% set items = items|merge({ 'peugeot': 'car' }) %} {# items now contains { 'apple': 'fruit', 'orange': 'fruit', 'peugeot': 'car' } #} </pre>
« More »

twig_slice

Slices a variable.

« More »

twig_first

Returns the first element of the item.

« More »

twig_last

Returns the last element of the item.

« More »

twig_join_filter

Joins the values to a string.

The separator between elements is an empty string per default, you can define it with the optional parameter. <pre> {{ [1, 2, 3]|join('|') }} {# returns 1|2|3 #} {{ [1, 2, 3]|join }} {# returns 123 #} </pre>
« More »

twig_split_filter

Splits the string into an array.

<pre> {{ "one,two,three"|split(',') }} {# returns [one, two, three] #} {{ "one,two,three,four,five"|split(',', 3) }} {# returns [one, two, "three,four,five"] #} {{ "123"|split('') }} {# returns [1, 2, 3] #} {{ "aabbcc"|split('', 2) }} {# returns [aa, bb, cc] #} </pre>
« More »

twig_get_array_keys_filter

Returns the keys for the given array.

It is useful when you want to iterate over the keys of an array: <pre> {% for key in array|keys %} {# ... #} {% endfor %} </pre>
« More »

twig_reverse_filter

Reverses a variable.

« More »

twig_sort_filter

Sorts an array.

« More »

twig_escape_filter

Escapes a string.

« More »

twig_convert_encoding

« More »

twig_length_filter

Returns the length of a variable.

« More »

twig_upper_filter

Converts a string to uppercase.

« More »

twig_lower_filter

Converts a string to lowercase.

« More »

twig_title_string_filter

Returns a titlecased string.

« More »

twig_capitalize_string_filter

Returns a capitalized string.

« More »

twig_test_empty

Checks if a variable is empty.

<pre> {# evaluates to true if the foo variable is null, false, or the empty string #} {% if foo is empty %} {# ... #} {% endif %} </pre>
« More »

twig_test_iterable

Checks if a variable is traversable.

<pre> {# evaluates to true if the foo variable is an array or a traversable object #} {% if foo is traversable %} {# ... #} {% endif %} </pre>
« More »

twig_include

Renders a template.

« More »

twig_source

Returns a template content without rendering it.

« More »

twig_constant

Provides the ability to get constants from instances as well as class/global constants.

« More »

twig_array_batch

Batches item.

« More »

twig_var_dump

« More »

twig_raw_filter

Marks a variable as being safe.

« More »

twig_template_from_string

Loads a template from a string.

<pre> {{ include(template_from_string("Hello {{ name }}")) }} </pre>
« More »

foo_escaper_for_test

« More »

test_foo

« More »

twig_tests_filter_dummy

« More »

twig_tests_filter_barbar

« More »

twig_tests_function_dummy

« More »

twig_tests_function_barbar

« More »

twig_tests_test_barbar

« More »

Constants

ENT_SUBSTITUTE

« More »

Classes, interfaces and traits

CallableInvocation

« More »

ConverterInterface

Convert file paths.

Please report bugs on https://github.com/matthiasmullie/path-converter/issues
« More »

IDriver

« More »

LocationAwareLoggerInterface

Interface implemented by loggers for warnings and debug messages.

The official Sass implementation recommends that loggers report the messages immediately rather than waiting for the end of the compilation, to provide a better debugging experience when the compilation does not end (error or infinite loop after the warning for instance).
« More »

LoggerInterface

Interface implemented by loggers for warnings and debug messages.

The official Sass implementation recommends that loggers report the messages immediately rather than waiting for the end of the compilation, to provide a better debugging experience when the compilation does not end (error or infinite loop after the warning for instance).
« More »

MarkdownInterface

« More »

SassException

« More »

Twig_CacheInterface

Interface implemented by cache classes.

It is highly recommended to always store templates on the filesystem to benefit from the PHP opcode cache. This interface is mostly useful if you need to implement a custom strategy for storing templates on the filesystem.
« More »

Twig_ExistsLoaderInterface

Empty interface for Twig 1.x compatibility.

« More »

Twig_Extension_InitRuntimeInterface

Declares the deprecated Twig_Extension::initRuntime() method.

Explicitely implement this interface if you really need to implement the deprecated initRuntime() method in your extensions.
« More »

Twig_ExtensionInterface

Interface implemented by extension classes.

« More »

Twig_LoaderInterface

Interface all loaders must implement.

« More »

Twig_NodeOutputInterface

Represents a displayable node in the AST.

« More »

Twig_NodeVisitorInterface

Twig_NodeVisitorInterface is the interface the all node visitor classes must implement.

« More »

Twig_Sandbox_SecurityPolicyInterface

Interfaces that all security policy classes must implements.

« More »

Twig_TokenParserInterface

Interface implemented by token parsers.

« More »

AbstractTest

Tests common functions of abstract Minify class by using JS implementation.

« More »

ADriver

« More »

ApiTest

API test

« More »

AtRootQueryParserTest

« More »

Base64VLQTest

Base64VLQ encoder test

« More »

BasicException

Basic Exception Class.

« More »

Box

An unmodifiable reference to a value that may be mutated elsewhere.

This uses reference equality based on the underlying {@see \ScssPhp\ScssPhp\Util\ModifiableBox}, even when the underlying type uses value equality.
« More »

CalculationOperation

A binary operation that can appear in a {@see SassCalculation}.

« More »

CExtDisablingNodeVisitor

« More »

CommaSeparatedTest

« More »

CompatTestCase

« More »

CompilationResult

« More »

Compiler

SCSS compiler

« More »

CompilerTest

« More »

ComplexUnitNumberTest

« More »

CompressedTest

« More »

ConstructorTest

« More »

ContentsTest

« More »

Converter

Convert paths relative from 1 file to another.

E.g. ../../images/icon.jpg relative to /css/imports/icons.css becomes ../images/icon.jpg relative to /css/minified.css Please report bugs on https://github.com/matthiasmullie/path-converter/issues
« More »

ConverterTest

Converter test case.

« More »

CSS

CSS minifier.

Please report bugs on https://github.com/matthiasmullie/minify/issues
« More »

CssMediaQueryTest

« More »

CSSTest

CSS minifier test case.

« More »

DBCCached

« More »

EmptyListTest

« More »

EmptyTest

« More »

Exception

« More »

Exception

Base Exception Class.

« More »

ExceptionTest

Exception test

« More »

FileImportException

File Import Exception Class.

« More »

FilesystemImporter

An importer that loads files from a load path on the filesystem.

« More »

FooObject

« More »

Frame

A single stack frame. Each frame points to a precise location in Sass code.

« More »

FrameworkTest

« More »

Generator

This class takes the output from 'parser', and generate the markdown templates.

« More »

Git

Git Interface Class

This class enables the creating, reading, and manipulation of git repositories.
« More »

GitRepo

Git Repository Interface Class

This class enables the creating, reading, and manipulation of a git repository
« More »

HslTest

« More »

HwbTest

« More »

ibase_driver

« More »

Importer

A base class for importers that resolves URLs in `@import`s to the contents of Sass files.

Importers should implement {@see \ScssPhp\ScssPhp\Importer\__toString} to provide a human-readable description of the importer. For example, the default filesystem importer returns its load path.
« More »

ImporterResult

« More »

InputTest

Input test - runs all the tests in inputs/ and compares their output to outputs/

« More »

IOException

IO Exception Class.

« More »

JS

JavaScript Minifier Class.

Please report bugs on https://github.com/matthiasmullie/minify/issues
« More »

JSTest

JS minifier test case.

« More »

KeyframeSelectorParserTest

« More »

lib_animate

css lib Class provided by System to provide css libs.

« More »

lib_bootstrap

js+css lib Class provided by System to provide js+css libs.

« More »

lib_bootstrap_growl

js lib Class provided by System to provide js libs.

« More »

lib_font_awesome

css lib Class provided by System to provide css libs.

« More »

lib_git

php lib Class provided by System to provide php libs.

« More »

lib_jqbootstrapvalidation

js lib Class provided by System to provide js libs.

« More »

lib_jquery

js lib Class provided by System to provide js libs.

« More »

lib_jquery_1_9_1

js lib Class provided by System to provide js libs.

« More »

lib_jquery_2_1_4

js lib Class provided by System to provide js libs.

« More »

lib_jstree

js lib Class provided by System to provide js libs.

« More »

lib_lettering

js lib Class provided by System to provide js libs.

« More »

lib_markdown

php lib Class provided by System to provide php libs.

« More »

lib_minify

php lib Class provided by System to provide php libs.

« More »

lib_phpdoc_md

php lib Class provided by System to provide php libs.

« More »

lib_phpdocumentor

php lib Class provided by System to provide php libs.

« More »

lib_popper

js lib Class provided by System to provide js libs.

« More »

lib_scssphp

php lib Class provided by System to provide php libs.

« More »

lib_tablesorter

js+css lib Class provided by System to provide js+css libs.

« More »

lib_textillate

js lib Class provided by System to provide js libs.

« More »

lib_tinymce

js lib Class provided by System to provide js libs.

« More »

Map

A map using Sass values as keys based on Value::equals.

The map can be either modifiable or unmodifiable. For unmodifiable maps, all mutators will throw a LogicException. Iteration preserves the order in which keys have been inserted.
« More »

Markdown

« More »

MarkdownExtra

« More »

MediaQueryParserTest

« More »

Minify

Abstract minifier class.

Please report bugs on https://github.com/matthiasmullie/minify/issues
« More »

mysql_driver

« More »

mysqli_driver

« More »

NestingTest

Selector nesting tests, taken from sass-spec TODO Remove those tests once the compiler uses this implementation of selectors, as sass-spec covers that logic

« More »

NoConverter

Don't convert paths.

Please report bugs on https://github.com/matthiasmullie/path-converter/issues
« More »

NoConverterTest

Converter test case.

« More »

NoOpImporter

An importer that never imports any stylesheets.

This is used for stylesheets which don't support relative imports, such as those created from PHP code with plain strings.
« More »

NoSaveCSS

CSS minifier.

Please report bugs on https://github.com/matthiasmullie/minify/issues
« More »

NoSaveJS

JavaScript Minifier Class.

Please report bugs on https://github.com/matthiasmullie/minify/issues
« More »

Number

Dimension + optional units

}
« More »

oracle_driver

« More »

OutputStyle

TODO convert to an enum with appropriate forward-compat/backward-compat APIs in 1.x

« More »

Parser

This class parses structure.xml and generates the api documentation.

« More »

PathTest

« More »

phpdoc_md

« More »

phpdocumentor

« More »

postgre_driver

« More »

Query

« More »

QuietLogger

A logger that silently ignores all messages.

« More »

QuotedAsciiTest

« More »

Result

« More »

RgbTest

« More »

sai_module_menu

« More »

SassArgumentList

A SassScript argument list.

An argument list comes from a rest argument. It's distinct from a normal {@see \ScssPhp\ScssPhp\Value\SassList} in that it may contain a keyword map as well as the positional arguments.
« More »

SassBoolean

A SassScript boolean value.

« More »

SassBooleanTest

« More »

SassCalculation

A SassScript calculation.

Although calculations can in principle have any name or any number of arguments, this class only exposes the specific calculations that are supported by the Sass spec. This ensures that all calculations that the user works with are always fully simplified.
« More »

SassColor

A SassScript color.

« More »

SassColorTest

« More »

SassFunction

A SassScript function reference.

A function reference captures a function from the local environment so that it may be passed between modules.
« More »

SassFunctionTest

« More »

SassList

A SassScript list.

« More »

SassListTest

« More »

SassMap

A SassScript map.

« More »

SassNull

The SassScript `null` value.

« More »

SassNullTest

« More »

SassNumber

A SassScript number.

Numbers can have units. Although there's no literal syntax for it, numbers support scientific-style numerator and denominator units (for example, `miles/hour`). These are expected to be resolved before being emitted to CSS.
« More »

SassNumberTest

« More »

SassScriptException

An exception thrown by SassScript.

This class does not implement SassException on purpose, as it should never be returned to the outside code. The compilation will catch it and replace it with a SassException reporting the location of the error.
« More »

SassSpecTest

Sass Spec Test - extracts tests from https://github.com/sass/sass-spec

« More »

SassString

A SassScript string.

Strings can either be quoted or unquoted. Unquoted strings are usually CSS identifiers, but they may contain any text.
« More »

ScalarValueTest

« More »

SelectorParserTest

« More »

SerializerTest

« More »

Settings

« More »

SingleElementTest

« More »

SingleUnitIntegerTest

« More »

StreamLogger

A logger that prints to a PHP stream (for instance stderr)

TODO implement LocationAwareLoggerInterface once the compiler is migrated to actually provide the location
« More »

SuperselectorTest

Selector comparison tests, taken from sass-spec TODO Remove those tests once the compiler uses this implementation of selectors, as sass-spec covers that logic

« More »

TestTokenParser

Base class for all token parsers.

« More »

Trace

A stack trace, comprised of a list of stack frames.

« More »

Twig_BaseNodeVisitor

Twig_BaseNodeVisitor can be used to make node visitors compatible with Twig 1.x and 2.x.

« More »

Twig_Cache_Filesystem

Implements a cache on the filesystem.

« More »

Twig_Cache_Null

Implements a no-cache strategy.

« More »

Twig_Compiler

Compiles a node to PHP code.

« More »

Twig_Environment

Stores the Twig configuration.

« More »

Twig_Error

Twig base exception.

This exception class and its children must only be used when an error occurs during the loading of a template, when a syntax error is detected in a template, or when rendering a template. Other errors must use regular PHP exception classes (like when the template cache directory is not writable for instance). To help debugging template issues, this class tracks the original template name and line where the error occurred. Whenever possible, you must set these information (original template name and line number) yourself by passing them to the constructor. If some or all these information are not available from where you throw the exception, then this class will guess them automatically (when the line number is set to -1 and/or the filename is set to null). As this is a costly operation, this can be disabled by passing false for both the filename and the line number when creating a new instance of this class.
« More »

Twig_Error_Loader

Exception thrown when an error occurs during template loading.

Automatic template information guessing is always turned off as if a template cannot be loaded, there is nothing to guess. However, when a template is loaded from another one, then, we need to find the current context and this is automatically done by Twig_Template::displayWithErrorHandling(). This strategy makes Twig_Environment::resolveTemplate() much faster.
« More »

Twig_Error_Runtime

Exception thrown when an error occurs at runtime.

« More »

Twig_Error_Syntax

Exception thrown when a syntax error occurs during lexing or parsing of a template.

« More »

Twig_ExpressionParser

Parses expressions.

This parser implements a "Precedence climbing" algorithm.
« More »

Twig_Extension

« More »

Twig_Extension_Core

« More »

Twig_Extension_Debug

« More »

Twig_Extension_Escaper

« More »

Twig_Extension_Optimizer

« More »

Twig_Extension_Profiler

« More »

Twig_Extension_Sandbox

« More »

Twig_Extension_StringLoader

« More »

Twig_FileExtensionEscapingStrategy

Default autoescaping strategy based on file names.

This strategy sets the HTML as the default autoescaping strategy, but changes it based on the filename. Note that there is no runtime performance impact as the default autoescaping strategy is set at compilation time.
« More »

Twig_Filter

Represents a template filter.

« More »

Twig_Function

Represents a template function.

« More »

Twig_Lexer

Lexes a template string.

« More »

Twig_Loader_Array

Loads a template from an array.

When using this loader with a cache mechanism, you should know that a new cache key is generated each time a template content "changes" (the cache key being the source code of the template). If you don't want to see your cache grows out of control, you need to take care of clearing the old cache file by yourself. This loader should only be used for unit testing.
« More »

Twig_Loader_Chain

Loads templates from other loaders.

« More »

Twig_Loader_Filesystem

Loads template from the filesystem.

« More »

Twig_Markup

Marks a content as safe.

« More »

Twig_Node

Represents a node in the AST.

« More »

Twig_Node_AutoEscape

Represents an autoescape node.

The value is the escaping strategy (can be html, js, ...) The true value is equivalent to html. If autoescaping is disabled, then the value is false.
« More »

Twig_Node_Block

Represents a block node.

« More »

Twig_Node_BlockReference

Represents a block call node.

« More »

Twig_Node_Body

Represents a body node.

« More »

Twig_Node_CheckSecurity

Represents a node in the AST.

« More »

Twig_Node_Do

Represents a do node.

« More »

Twig_Node_Embed

Represents an embed node.

« More »

Twig_Node_Expression

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Array

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_AssignName

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Add

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_And

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_BitwiseAnd

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_BitwiseOr

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_BitwiseXor

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Concat

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Div

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_EndsWith

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Equal

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_FloorDiv

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Greater

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_GreaterEqual

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_In

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Less

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_LessEqual

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Matches

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Mod

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Mul

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_NotEqual

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_NotIn

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Or

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Power

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Range

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_StartsWith

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Binary_Sub

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_BlockReference

Represents a block call node.

« More »

Twig_Node_Expression_Call

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Conditional

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Constant

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_ExtensionReference

Represents an extension call node.

« More »

Twig_Node_Expression_Filter

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Filter_Default

Returns the value or the default value when it is undefined or empty.

<pre> {{ var.foo|default('foo item on var is not defined') }} </pre>
« More »

Twig_Node_Expression_Function

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_GetAttr

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_MethodCall

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Name

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Parent

Represents a parent node.

« More »

Twig_Node_Expression_TempName

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Test

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Test_Constant

Checks if a variable is the exact same value as a constant.

<pre> {% if post.status is constant('Post::PUBLISHED') %} the status attribute is exactly the same as Post::PUBLISHED {% endif %} </pre>
« More »

Twig_Node_Expression_Test_Defined

Checks if a variable is defined in the current context.

<pre> {# defined works with variable names and variable attributes #} {% if foo is defined %} {# ... #} {% endif %} </pre>
« More »

Twig_Node_Expression_Test_Divisibleby

Checks if a variable is divisible by a number.

<pre> {% if loop.index is divisible by(3) %} </pre>
« More »

Twig_Node_Expression_Test_Even

Checks if a number is even.

<pre> {{ var is even }} </pre>
« More »

Twig_Node_Expression_Test_Null

Checks that a variable is null.

<pre> {{ var is none }} </pre>
« More »

Twig_Node_Expression_Test_Odd

Checks if a number is odd.

<pre> {{ var is odd }} </pre>
« More »

Twig_Node_Expression_Test_Sameas

Checks if a variable is the same as another one (=== in PHP).

« More »

Twig_Node_Expression_Unary

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Unary_Neg

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Unary_Not

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Expression_Unary_Pos

Abstract class for all nodes that represents an expression.

« More »

Twig_Node_Flush

Represents a flush node.

« More »

Twig_Node_For

Represents a for node.

« More »

Twig_Node_ForLoop

Internal node used by the for node.

« More »

Twig_Node_If

Represents an if node.

« More »

Twig_Node_Import

Represents an import node.

« More »

Twig_Node_Include

Represents an include node.

« More »

Twig_Node_Macro

Represents a macro node.

« More »

Twig_Node_Module

Represents a module node.

Consider this class as being final. If you need to customize the behavior of the generated class, consider adding nodes to the following nodes: display_start, display_end, constructor_start, constructor_end, and class_end.
« More »

Twig_Node_Print

Represents a node that outputs an expression.

« More »

Twig_Node_Sandbox

Represents a sandbox node.

« More »

Twig_Node_SandboxedPrint

Twig_Node_SandboxedPrint adds a check for the __toString() method when the variable is an object and the sandbox is activated.

When there is a simple Print statement, like {{ article }}, and if the sandbox is enabled, we need to check that the __toString() method is allowed if 'article' is an object.
« More »

Twig_Node_Set

Represents a set node.

« More »

Twig_Node_Spaceless

Represents a spaceless node.

It removes spaces between HTML tags.
« More »

Twig_Node_Text

Represents a text node.

« More »

Twig_NodeTraverser

Twig_NodeTraverser is a node traverser.

It visits all nodes and their children and calls the given visitor for each.
« More »

Twig_NodeVisitor_Escaper

Twig_NodeVisitor_Escaper implements output escaping.

« More »

Twig_NodeVisitor_Optimizer

Twig_NodeVisitor_Optimizer tries to optimizes the AST.

This visitor is always the last registered one. You can configure which optimizations you want to activate via the optimizer mode.
« More »

Twig_NodeVisitor_SafeAnalysis

Twig_BaseNodeVisitor can be used to make node visitors compatible with Twig 1.x and 2.x.

« More »

Twig_NodeVisitor_Sandbox

Twig_NodeVisitor_Sandbox implements sandboxing.

« More »

Twig_Parser

Default parser implementation.

« More »

Twig_Profiler_Dumper_Blackfire

« More »

Twig_Profiler_Dumper_Html

« More »

Twig_Profiler_Dumper_Text

« More »

Twig_Profiler_Node_EnterProfile

Represents a profile enter node.

« More »

Twig_Profiler_Node_LeaveProfile

Represents a profile leave node.

« More »

Twig_Profiler_NodeVisitor_Profiler

Twig_BaseNodeVisitor can be used to make node visitors compatible with Twig 1.x and 2.x.

« More »

Twig_Profiler_Profile

« More »

Twig_Sandbox_SecurityError

Exception thrown when a security error occurs at runtime.

« More »

Twig_Sandbox_SecurityNotAllowedFilterError

Exception thrown when a not allowed filter is used in a template.

« More »

Twig_Sandbox_SecurityNotAllowedFunctionError

Exception thrown when a not allowed function is used in a template.

« More »

Twig_Sandbox_SecurityNotAllowedTagError

Exception thrown when a not allowed tag is used in a template.

« More »

Twig_Sandbox_SecurityPolicy

Represents a security policy which need to be enforced when sandbox mode is enabled.

« More »

Twig_SimpleFilter

Empty class for Twig 1.x compatibility.

« More »

Twig_SimpleFunction

Empty class for Twig 1.x compatibility.

« More »

Twig_SimpleTest

Empty class for Twig 1.x compatibility.

« More »

Twig_Template

Default base class for compiled templates.

« More »

Twig_TemplateArrayAccessObject

« More »

Twig_TemplateIterator

« More »

Twig_TemplateMagicMethodExceptionObject

« More »

Twig_TemplateMagicMethodObject

« More »

Twig_TemplateMagicPropertyObject

« More »

Twig_TemplateMagicPropertyObjectWithException

« More »

Twig_TemplateMethodAndPropObject

« More »

Twig_TemplateMethodObject

« More »

Twig_TemplatePropertyObject

« More »

Twig_TemplatePropertyObjectAndArrayAccess

« More »

Twig_TemplatePropertyObjectAndIterator

« More »

Twig_TemplatePropertyObjectDefinedWithUndefinedValue

« More »

Twig_TemplateTest

Default base class for compiled templates.

« More »

Twig_Test

Represents a template test.

« More »

Twig_Test_EscapingTest

This class is adapted from code coming from Zend Framework.

« More »

Twig_Test_IntegrationTestCase

Integration test helper.

« More »

Twig_Test_NodeTestCase

« More »

Twig_Tests_Cache_FilesystemTest

« More »

Twig_Tests_CompilerTest

« More »

Twig_Tests_EnvironmentTest

« More »

Twig_Tests_EnvironmentTest_Extension

« More »

Twig_Tests_EnvironmentTest_ExtensionWithDeprecationInitRuntime

« More »

Twig_Tests_EnvironmentTest_ExtensionWithoutDeprecationInitRuntime

« More »

Twig_Tests_EnvironmentTest_NodeVisitor

« More »

Twig_Tests_EnvironmentTest_TokenParser

Base class for all token parsers.

« More »

Twig_Tests_ErrorTest

« More »

Twig_Tests_ErrorTest_Foo

« More »

Twig_Tests_ExpressionParserTest

« More »

Twig_Tests_Extension_CoreTest

« More »

Twig_Tests_Extension_SandboxTest

« More »

Twig_Tests_FileExtensionEscapingStrategyTest

« More »

Twig_Tests_IntegrationTest

Integration test helper.

« More »

Twig_Tests_LexerTest

« More »

Twig_Tests_Loader_ArrayTest

« More »

Twig_Tests_Loader_ChainTest

« More »

Twig_Tests_Loader_FilesystemTest

« More »

Twig_Tests_NativeExtensionTest

« More »

Twig_Tests_Node_AutoEscapeTest

« More »

Twig_Tests_Node_BlockReferenceTest

« More »

Twig_Tests_Node_BlockTest

« More »

Twig_Tests_Node_DoTest

« More »

Twig_Tests_Node_Expression_ArrayTest

« More »

Twig_Tests_Node_Expression_AssignNameTest

« More »

Twig_Tests_Node_Expression_Binary_AddTest

« More »

Twig_Tests_Node_Expression_Binary_AndTest

« More »

Twig_Tests_Node_Expression_Binary_ConcatTest

« More »

Twig_Tests_Node_Expression_Binary_DivTest

« More »

Twig_Tests_Node_Expression_Binary_FloorDivTest

« More »

Twig_Tests_Node_Expression_Binary_ModTest

« More »

Twig_Tests_Node_Expression_Binary_MulTest

« More »

Twig_Tests_Node_Expression_Binary_OrTest

« More »

Twig_Tests_Node_Expression_Binary_SubTest

« More »

Twig_Tests_Node_Expression_Call

Abstract class for all nodes that represents an expression.

« More »

Twig_Tests_Node_Expression_CallTest

« More »

Twig_Tests_Node_Expression_ConditionalTest

« More »

Twig_Tests_Node_Expression_ConstantTest

« More »

Twig_Tests_Node_Expression_FilterTest

« More »

Twig_Tests_Node_Expression_FunctionTest

« More »

Twig_Tests_Node_Expression_GetAttrTest

« More »

Twig_Tests_Node_Expression_NameTest

« More »

Twig_Tests_Node_Expression_ParentTest

« More »

Twig_Tests_Node_Expression_TestTest

« More »

Twig_Tests_Node_Expression_Unary_NegTest

« More »

Twig_Tests_Node_Expression_Unary_NotTest

« More »

Twig_Tests_Node_Expression_Unary_PosTest

« More »

Twig_Tests_Node_ForTest

« More »

Twig_Tests_Node_IfTest

« More »

Twig_Tests_Node_ImportTest

« More »

Twig_Tests_Node_IncludeTest

« More »

Twig_Tests_Node_MacroTest

« More »

Twig_Tests_Node_ModuleTest

« More »

Twig_Tests_Node_PrintTest

« More »

Twig_Tests_Node_SandboxedPrintTest

« More »

Twig_Tests_Node_SandboxTest

« More »

Twig_Tests_Node_SetTest

« More »

Twig_Tests_Node_SpacelessTest

« More »

Twig_Tests_Node_TextTest

« More »

Twig_Tests_NodeVisitor_OptimizerTest

« More »

Twig_Tests_ParserTest

« More »

Twig_Tests_Profiler_Dumper_AbstractTest

« More »

Twig_Tests_Profiler_Dumper_BlackfireTest

« More »

Twig_Tests_Profiler_Dumper_HtmlTest

« More »

Twig_Tests_Profiler_Dumper_TextTest

« More »

Twig_Tests_Profiler_ProfileTest

« More »

Twig_Tests_TemplateTest

« More »

Twig_Tests_TokenStreamTest

« More »

Twig_Token

Represents a Token.

« More »

Twig_TokenParser

Base class for all token parsers.

« More »

Twig_TokenParser_AutoEscape

Marks a section of a template to be escaped or not.

« More »

Twig_TokenParser_Block

Marks a section of a template as being reusable.

<pre> {% block head %} <link rel="stylesheet" href="style.css" /> <title>{% block title %}{% endblock %} - My Webpage</title> {% endblock %} </pre>
« More »

Twig_TokenParser_Do

Evaluates an expression, discarding the returned value.

« More »

Twig_TokenParser_Embed

Embeds a template.

« More »

Twig_TokenParser_Extends

Extends a template by another one.

<pre> {% extends "base.html" %} </pre>
« More »

Twig_TokenParser_Filter

Filters a section of a template by applying filters.

<pre> {% filter upper %} This text becomes uppercase {% endfilter %} </pre>
« More »

Twig_TokenParser_Flush

Flushes the output to the client.

« More »

Twig_TokenParser_For

Loops over each item of a sequence.

<pre> <ul> {% for user in users %} <li>{{ user.username|e }}</li> {% endfor %} </ul> </pre>
« More »

Twig_TokenParser_From

Imports macros.

<pre> {% from 'forms.html' import forms %} </pre>
« More »

Twig_TokenParser_If

Tests a condition.

<pre> {% if users %} <ul> {% for user in users %} <li>{{ user.username|e }}</li> {% endfor %} </ul> {% endif %} </pre>
« More »

Twig_TokenParser_Import

Imports macros.

<pre> {% import 'forms.html' as forms %} </pre>
« More »

Twig_TokenParser_Include

Includes a template.

<pre> {% include 'header.html' %} Body {% include 'footer.html' %} </pre>
« More »

Twig_TokenParser_Macro

Defines a macro.

<pre> {% macro input(name, value, type, size) %} <input type="{{ type|default('text') }}" name="{{ name }}" value="{{ value|e }}" size="{{ size|default(20) }}" /> {% endmacro %} </pre>
« More »

Twig_TokenParser_Sandbox

Marks a section of a template as untrusted code that must be evaluated in the sandbox mode.

<pre> {% sandbox %} {% include 'user.html' %} {% endsandbox %} </pre>
« More »

Twig_TokenParser_Set

Defines a variable.

<pre> {% set foo = 'foo' %} {% set foo = [1, 2] %} {% set foo = {'foo': 'bar'} %} {% set foo = 'foo' ~ 'bar' %} {% set foo, bar = 'foo', 'bar' %} {% set foo %}Some content{% endset %} </pre>
« More »

Twig_TokenParser_Spaceless

Remove whitespaces between HTML tags.

<pre> {% spaceless %} <div> <strong>foo</strong> </div> {% endspaceless %} {# output will be <div><strong>foo</strong></div> #} </pre>
« More »

Twig_TokenParser_Use

Imports blocks defined in another template into the current template.

<pre> {% extends "base.html" %} {% use "blocks.html" %} {% block title %}{% endblock %} {% block content %}{% endblock %} </pre>
« More »

Twig_TokenStream

Represents a token stream.

« More »

Twig_Util_DeprecationCollector

« More »

Twig_Util_TemplateDirIterator

« More »

TwigTestExtension

« More »

TwigTestFoo

« More »

TwigTestTokenParser_§

Base class for all token parsers.

« More »

Type

Block/node types

« More »

UnificationTest

Selector unification tests, taken from sass-spec TODO Remove those tests once the compiler uses this implementation of selectors, as sass-spec covers that logic

« More »

UnitlessDoubleTest

« More »

UnitlessFuzzyIntegerTest

« More »

UnitlessIntegerTest

« More »

UnquotedAsciiTest

« More »

UnquotedUnicodeTest

« More »

Value

A SassScript value.

All SassScript values are unmodifiable. New values can be constructed using subclass constructors like `new SassString`. Untyped values can be cast to particular types using `assert*()` functions like {@see \ScssPhp\ScssPhp\Value\assertString}, which throw user-friendly error messages if they fail.
« More »

ValueConverter

« More »

ValueTestCase

« More »

Version

SCSSPHP version

« More »