\Ceo\View\FiltersCoerce

Typeless languages are kind of a pain. This filter allows you to coerce a twig variable into a fixed primitive type.

Coercion filters:

  • string
  • int
  • float
  • bool

Uses PHP type coercion internally.

{{ 'foo/bar'|url({'a': 1}) }} becomes /foo/bar?a=1

Summary

Methods
Properties
Constants
__construct()
getFilterOptions()
getDI()
getFilterName()
handle()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct() 

getFilterOptions()

getFilterOptions() 

getDI()

getDI() : object

Return default dependency injector

Returns

object —

Phalcon\Di

getFilterName()

getFilterName() : string

Return the filter name

Returns

string

handle()

handle(  $var,   $coerce) : string

Handle filter response

Parameters

$var
$coerce

Returns

string