Simple function call:
{{ pngout("images/logo.png") }}
Simple filter call:
{{ "images/logo.png"|pngout }}
<?php | |
use Assetic\Asset\AssetInterface; | |
use Assetic\Filter\FilterInterface; | |
class UniversalFilter implements FilterInterface | |
{ | |
static private $factories = array(); |
private function getBlockName(\Twig_NodeInterface $node, \Twig_Environment $env) | |
{ | |
if ($node instanceof \Twig_Node_Expression_Function) { | |
if ('cms_block' == $node->getNode('name')->getAttribute('name')) { | |
} | |
} | |
} |
assetic: | |
filters: | |
less: | |
node: /usr/local/bin/node | |
node_paths: [ /usr/local/lib/node ] |
Simple function call:
{{ pngout("images/logo.png") }}
Simple filter call:
{{ "images/logo.png"|pngout }}
<?php | |
/* | |
* This file is part of the Assetic package. | |
* | |
* (c) Kris Wallsmith <kris.wallsmith@gmail.com> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
<?php | |
/** | |
* @annot:ns("Doctrine\ODM\MongoDB\Mapping", { | |
* "validation"="Symfony\Component\Validator\Constraints" | |
* }) | |
* | |
* @Document | |
*/ | |
class Product |
<?php | |
interface Configurable | |
{ | |
static function getOptionsBag(); | |
} | |
class Form implements Configurable | |
{ | |
public function __construct($options = array()) |
<?php | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Symfony\Component\DependencyInjection\Factory\StaticFactory; | |
use Symfony\Component\DependencyInjection\Scope\ContainerScope; | |
use Symfony\Component\DependencyInjection\Scope\NestingContainerScope; | |
use Symfony\Component\DependencyInjection\Scope\Scope; | |
use Symfony\Component\DependencyInjection\ScopedContainer; | |
class Connection |
<service id="swiftmailer.message" class="Swift_Message" factory-method="newInstance" shared="false"> | |
<file>%swiftmailer.init_file%</file> | |
<argument>null</argument> | |
<argument>null</argument> | |
<argument>null</argument> | |
<argument>%kernel.charset%</argument> | |
<call method="setFrom"> | |
<argument>noreply@example.com</argument> | |
</call> | |
</service> |
<?php | |
class Tag | |
{ | |
public function normalizeName($name) | |
{ | |
$normal = trim($name); | |
$normal = strtolower($normal); | |
return $normal; |