Get functions defined by this Expression Language element.

@return ExpressionFunction[] An array of Function instances
497298
public function getFunctions()
    {
        return [
            new ExpressionFunction('elcodi_config', function ($name, $defaultValue = null) {

                return ($defaultValue)
                    ? sprintf(
                        '$this->get(\'elcodi.manager.configuration\')->get(%s,%s)',
                        $name,
                        $defaultValue
                    )
                    : sprintf(
                        '$this->get(\'elcodi.manager.configuration\')->get(%s)',
                        $name
                    );

            }, function (array $variables, $name, $defaultValue = null) {
                return $variables['container']
                    ->get('elcodi.manager.configuration')
                    ->get($name, $defaultValue);
            }),
        ];
    }
493448
public function getFunctions()
    {
        return [
            new \Twig_SimpleFunction('array', [$this, 'arrayFilter']),
            new \Twig_SimpleFunction('array_key_value', [$this, 'arrayKeyValueFunc']),
            new \Twig_SimpleFunction('array_key_exists', 'array_key_exists'),
            new \Twig_SimpleFunction('array_unique', 'array_unique'),
            new \Twig_SimpleFunction('array_intersect', [$this, 'arrayIntersectFunc']),
            new \Twig_SimpleFunction('authorize', [$this, 'authorize']),
            new \Twig_SimpleFunction('debug', [$this, 'dump'], ['needs_context' => true, 'needs_environment' => true]),
            new \Twig_SimpleFunction('dump', [$this, 'dump'], ['needs_context' => true, 'needs_environment' => true]),
            new \Twig_SimpleFunction('vardump', [$this, 'vardumpFunc']),
            new \Twig_SimpleFunction('print_r', 'print_r'),
            new \Twig_SimpleFunction('http_response_code', 'http_response_code'),
            new \Twig_SimpleFunction('evaluate', [$this, 'evaluateStringFunc'], ['needs_context' => true]),
            new \Twig_SimpleFunction('evaluate_twig', [$this, 'evaluateTwigFunc'], ['needs_context' => true]),
            new \Twig_SimpleFunction('gist', [$this, 'gistFunc']),
            new \Twig_SimpleFunction('nonce_field', [$this, 'nonceFieldFunc']),
            new \Twig_SimpleFunction('pathinfo', 'pathinfo'),
            new \Twig_SimpleFunction('random_string', [$this, 'randomStringFunc']),
            new \Twig_SimpleFunction('repeat', [$this, 'repeatFunc']),
            new \Twig_SimpleFunction('regex_replace', [$this, 'regexReplace']),
            new \Twig_SimpleFunction('regex_filter', [$this, 'regexFilter']),
            new \Twig_SimpleFunction('string', [$this, 'stringFunc']),
            new \Twig_SimpleFunction('url', [$this, 'urlFunc']),
            new \Twig_SimpleFunction('json_decode', [$this, 'jsonDecodeFilter']),
            new \Twig_SimpleFunction('get_cookie', [$this, 'getCookie']),
            new \Twig_SimpleFunction('redirect_me', [$this, 'redirectFunc']),
            new \Twig_SimpleFunction('range', [$this, 'rangeFunc']),
            new \Twig_SimpleFunction('isajaxrequest', [$this, 'isAjaxFunc']),
            new \Twig_SimpleFunction('exif', [$this, 'exifFunc']),
            new \Twig_SimpleFunction('media_directory', [$this, 'mediaDirFunc']),
            new \Twig_SimpleFunction('body_class', [$this, 'bodyClassFunc']),
            new \Twig_SimpleFunction('theme_var', [$this, 'themeVarFunc']),
            new \Twig_SimpleFunction('header_var', [$this, 'pageHeaderVarFunc']),
            new \Twig_SimpleFunction('read_file', [$this, 'readFileFunc']),
            new \Twig_SimpleFunction('nicenumber', [$this, 'niceNumberFunc']),
            new \Twig_SimpleFunction('nicefilesize', [$this, 'niceFilesizeFunc']),
            new \Twig_SimpleFunction('nicetime', [$this, 'nicetimeFunc']),
            new \Twig_SimpleFunction('cron', [$this, 'cronFunc']),
            new \Twig_SimpleFunction('xss', [$this, 'xssFunc']),


            // Translations
            new \Twig_SimpleFunction('t', [$this, 'translate'], ['needs_environment' => true]),
            new \Twig_SimpleFunction('tl', [$this, 'translateLanguage']),
            new \Twig_SimpleFunction('ta', [$this, 'translateArray']),

            // Object Types
            new \Twig_SimpleFunction('get_type', [$this, 'getTypeFunc']),
            new \Twig_SimpleFunction('of_type', [$this, 'ofTypeFunc'])
        ];
    }
18486
protected function getMessagesFunctions() {
		if ( $this->messagesFunctions == null ) {
			$this->messagesFunctions = MessagesFunctions::getInstance( $this->localBaseDir, $this );
		}
		return $this->messagesFunctions;
	}
118138
public function FunctionDeclaration()
    {
        $token = $this->lexer->lookahead;
        $funcName = strtolower($token['value']);

        // Check for built-in functions first!
        switch (true) {
            case (isset(self::$_STRING_FUNCTIONS[$funcName])):
                return $this->FunctionsReturningStrings();

            case (isset(self::$_NUMERIC_FUNCTIONS[$funcName])):
                return $this->FunctionsReturningNumerics();

            case (isset(self::$_DATETIME_FUNCTIONS[$funcName])):
                return $this->FunctionsReturningDatetime();

            default:
                return $this->CustomFunctionDeclaration();
        }
    }
411482
public function getFunctions()
    {
        return [
            new Twig_SimpleFunction('url', function ($name, array $parameters = [], $format = null) {
                return $this->getContainer()->singleton('kernel.dispatch')->dispatch('handle.url', [$name, $parameters, $format]);
            }),
            new Twig_SimpleFunction('asset', function ($name, $version = null) {
                return $this->getContainer()->singleton('kernel.dispatch')->dispatch('handle.asset', [$name, $version]);
            }),
        ];
    }
659380
public function getFunctionsUsed( $excludePrefixes = array() )
	{
		if ( is_string( $excludePrefixes ) )
		{
			$excludePrefixes = array( $excludePrefixes );
		}

		$result = $this->traverseNodes( $this->exprTree, function( $node ) use( &$result, $excludePrefixes )
		{
			// TODO Test the functions in this node and return false if any are found
			return true;
		} );

		return ! $result;
	}
261555
public function getFunctions()
    {
        return [
            new Twig_SimpleFunction('metric_beacon_unique', function ($token, $event, $dates) {

                return $this
                    ->metricBucket
                    ->getBeaconsUnique($token, $event, $dates);
            }),
            new Twig_SimpleFunction('metric_beacon_total', function ($token, $event, $dates) {

                return $this
                    ->metricBucket
                    ->getBeaconsTotal($token, $event, $dates);
            }),
            new Twig_SimpleFunction('metric_accumulation', function ($token, $event, $dates) {

                return $this
                    ->metricBucket
                    ->getAccumulation($token, $event, $dates);
            }),
            new Twig_SimpleFunction('metric_distributions', function ($token, $event, $dates) {

                return $this
                    ->metricBucket
                    ->getDistributions($token, $event, $dates);
            }),
        ];
    }
646227
private function CustomFunctionDeclaration()
    {
        $token = $this->lexer->lookahead;
        $funcName = strtolower($token['value']);

        // Check for custom functions afterwards
        $config = $this->em->getConfiguration();

        switch (true) {
            case ($config->getCustomStringFunction($funcName) !== null):
                return $this->CustomFunctionsReturningStrings();

            case ($config->getCustomNumericFunction($funcName) !== null):
                return $this->CustomFunctionsReturningNumerics();

            case ($config->getCustomDatetimeFunction($funcName) !== null):
                return $this->CustomFunctionsReturningDatetime();

            default:
                $this->syntaxError('known function', $token);
        }
    }
1021233
public function getFunctions()
    {
        return [
            new Twig_SimpleFunction('embedly_display', array($this->client, 'display')),
            new Twig_SimpleFunction('embedly_extract', array($this->client, 'extract')),
            new Twig_SimpleFunction('embedly_oembed', array($this->client, 'oembed')),
        ];
    }
1058552
protected function createSliceFunction()
    {
        return new ExpressionFunction(
            'slice',
            function ($array, $start, $length = null, $preserveKeys = false) {
                return sprintf('array_slice(%s, %s, %s, %s)', $array, $start, $length, $preserveKeys);
            },
            function ($arguments, $array, $start, $length = null, $preserveKeys = false) {
                return array_slice($array, $start, $length, $preserveKeys);
            }
        );
    }
55906
protected function getFunctionDocBlockLines() {
    $lines = [];

    if (!empty($this->component_data['function_docblock_lines'])) {
      $lines = $this->component_data['function_docblock_lines'];

      if (count($lines) > 1) {
        // If there is more than one line, splice in a blank line after the
        // first one.
        array_splice($lines, 1, 0, '');
      }
    }
    elseif (!empty($this->component_data['doxygen_first'])) {
      $lines[] = $this->component_data['doxygen_first'];
    }

    return $lines;
  }
49029
function getFunctionDefinitions(variable) {
            const functionDefinitions = [];

            variable.defs.forEach(def => {
                const { type, node } = def;

                // FunctionDeclarations
                if (type === "FunctionName") {
                    functionDefinitions.push(node);
                }

                // FunctionExpressions
                if (type === "Variable" && node.init &&
                    (node.init.type === "FunctionExpression" || node.init.type === "ArrowFunctionExpression")) {
                    functionDefinitions.push(node.init);
                }
            });
            return functionDefinitions;
        }
1105122
public function getFunctions(): array
    {
        return [
            new TwigFunction('time', function ($time = null, $timezone = null) {
                return new CakeTime($time, $timezone);
            }),
            new TwigFunction('timezones', 'Cake\I18n\Time::listTimezones'),
        ];
    }
279702
public function getFunctions()
    {
        return array(
            new Twig_SimpleFunction('max', 'max'),
            new Twig_SimpleFunction('min', 'min'),
            new Twig_SimpleFunction('range', 'range'),
            new Twig_SimpleFunction('constant', 'twig_constant'),
            new Twig_SimpleFunction('cycle', 'twig_cycle'),
            new Twig_SimpleFunction('random', 'twig_random', array('needs_environment' => true)),
            new Twig_SimpleFunction('date', 'twig_date_converter', array('needs_environment' => true)),
            new Twig_SimpleFunction('include', 'twig_include', array('needs_environment' => true, 'needs_context' => true, 'is_safe' => array('all'))),
            new Twig_SimpleFunction('source', 'twig_source', array('needs_environment' => true, 'is_safe' => array('all'))),
        );
    }
379336
public function getFunctions(): array
    {
        return [
            new TwigFunction('elementExists', function ($name) {
                return $this->view->elementExists($name);
            }),
            new TwigFunction('getVars', function () {
                return $this->view->getVars();
            }),
            new TwigFunction('get', function ($var, $default = null) {
                return $this->view->get($var, $default);
            }),
        ];
    }
735078
public function getFunctions()
    {
        //Function definition
        return array(
            'mesd_jasper_reportviewer_stored_report_link' => new \Twig_Function_Method($this, 'renderStoredReportLink',  array('is_safe' => array('html'))),
            'mesd_jasper_reportviewer_report_link' => new \Twig_Function_Method($this, 'renderReportLink',  array('is_safe' => array('html'))),
            'mesd_jasper_reportviewer_home' => new \Twig_Function_Method($this, 'renderReportHome', array('is_safe' => array('html'))),
            'mesd_jasper_reportviewer_uri' => new \Twig_Function_Method($this, 'renderReportURI', array('is_safe' => array('html'))),
            'mesd_jasper_reportviewer_direct_link' => new \Twig_Function_Method($this, 'renderDirectReportLink', array('is_safe' => array('html')))
        );
    }
219527
public function getFunctions()
    {
        $options = ['needs_environment' => true];

        return [
            new Twig_SimpleFunction('stripe_render', [
                $this->stripeTemplateRender,
                'renderStripeForm',
            ], $options),
            new Twig_SimpleFunction('stripe_scripts', [
                $this->stripeTemplateRender,
                'renderStripeScripts',
            ], $options),
        ];
    }