private function checkNode(\Twig_Node $node, \Twig_Environment $env, &$name = null)
    {
        if ($node instanceof \Twig_Node_Expression_Function) {
            $name = $node->getAttribute('name');
            if ($env->getFunction($name) instanceof AsseticFilterFunction) {
                $arguments = array();
                foreach ($node->getNode('arguments') as $argument) {
                    $arguments[] = eval('return '.$env->compile($argument).';');
                }

                $invoker = $env->getExtension('assetic')->getFilterInvoker($name);
                $factory = $invoker->getFactory();

                $inputs = isset($arguments[0]) ? (array) $arguments[0] : array();
                $filters = $invoker->getFilters();
                $options = array_replace($invoker->getOptions(), isset($arguments[1]) ? $arguments[1] : array());

                if (!isset($options['name'])) {
                    $options['name'] = $factory->generateAssetName($inputs, $filters);
                }

                return array($inputs, $filters, $options);
            }
        }
    }
private function checkNode(\Twig_Node $node, \Twig_Environment $env, &$name = null)
    {
        if ($node instanceof \Twig_Node_Expression_Function) {
            $name = $node->getAttribute('name');
            if ($env->getFunction($name) instanceof AsseticFilterFunction) {
                $arguments = array();
                foreach ($node->getNode('arguments') as $argument) {
                    $arguments[] = eval('return '.$env->compile($argument).';');
                }

                $invoker = $env->getExtension('assetic')->getFilterInvoker($name);
                $factory = $invoker->getFactory();

                $inputs = isset($arguments[0]) ? (array) $arguments[0] : array();
                $filters = $invoker->getFilters();
                $options = array_replace($invoker->getOptions(), isset($arguments[1]) ? $arguments[1] : array());

                if (!isset($options['name'])) {
                    $options['name'] = $factory->generateAssetName($inputs, $filters);
                }

                return array($inputs, $filters, $options);
            }
        }
    }
private function checkNode ( \ Twig_Node $ node , \ Twig_Environment $ env , & $ name = null ) { if ( $ node instanceof \ Twig_Node_Expression_Function ) { $ name = $ node -> getAttribute ( 'name' ) ; if ( $ env -> getFunction ( $ name ) instanceof AsseticFilterFunction ) { $ arguments = array ( ) ; foreach ( $ node -> getNode ( 'arguments' ) as $ argument ) { $ arguments [ ] = eval ( 'return ' . $ env -> compile ( $ argument ) . ';' ) ; } $ invoker = $ env -> getExtension ( 'assetic' ) -> getFilterInvoker ( $ name ) ; $ factory = $ invoker -> getFactory ( ) ; $ inputs = isset ( $ arguments [ 0 ] ) ? ( array ) $ arguments [ 0 ] : array ( ) ; $ filters = $ invoker -> getFilters ( ) ; $ options = array_replace ( $ invoker -> getOptions ( ) , isset ( $ arguments [ 1 ] ) ? $ arguments [ 1 ] : array ( ) ) ; if ( ! isset ( $ options [ 'name' ] ) ) { $ options [ 'name' ] = $ factory -> generateAssetName ( $ inputs , $ filters ) ; } return array ( $ inputs , $ filters , $ options ) ; } } }
Extracts formulae from filter function nodes.

@return array|null The formula
Extracts formulae from filter function nodes .