Ejemplo n.º 1
0
 /**
  * @expectedException \Exception
  */
 public function testRegisterFilterFailNotCallable()
 {
     $this->_loader->registerFilter('testFilter', array($this->_collection, 'not a real method'));
 }
Ejemplo n.º 2
0
 /**
  * Register filters to loader
  *
  * @param Loader $loader
  *
  * @return void
  */
 public function register(Loader $loader)
 {
     $loader->registerFilter('add', array($this, 'add'))->registerFilter('subtract', array($this, 'subtract'))->registerFilter('multiply', array($this, 'multiply'))->registerFilter('divide', array($this, 'divide'))->registerFilter('percentage', array($this, 'percentage'));
 }
Ejemplo n.º 3
0
 /**
  * Register filters to the loader
  *
  * @param Loader $loader
  *
  * @return void
  */
 public function register(Loader $loader)
 {
     $loader->registerFilter('uppercase', array($this, 'uppercase'))->registerFilter('lowercase', array($this, 'lowercase'))->registerFilter('titlecase', array($this, 'titlecase'))->registerFilter('prefix', array($this, 'prefix'))->registerFilter('suffix', array($this, 'suffix'))->registerFilter('trim', array($this, 'trim'))->registerFilter('rtrim', array($this, 'rtrim'))->registerFilter('ltrim', array($this, 'ltrim'))->registerFilter('capitalize', array($this, 'capitalize'))->registerFilter('replace', array($this, 'replace'))->registerFilter('toUrl', array($this, 'toUrl'))->registerFilter('slug', array($this, 'slug'));
 }
Ejemplo n.º 4
0
 /**
  * Register the filters to the validation loader.
  *
  * @param Loader $loader The validation loader instance
  *
  * @return void
  */
 public function register(Loader $loader)
 {
     $loader->registerFilter('string', array($this, 'string'))->registerFilter('int', array($this, 'integer'))->registerFilter('integer', array($this, 'integer'))->registerFilter('float', array($this, 'float'))->registerFilter('boolean', array($this, 'boolean'))->registerFilter('bool', array($this, 'boolean'))->registerFilter('array', array($this, 'toArray'))->registerFilter('object', array($this, 'object'))->registerFilter('date', array($this, 'date'))->registerFilter('null', array($this, 'null'));
 }
Ejemplo n.º 5
0
 /**
  * Register filters to loader
  *
  * @param Loader $loader
  *
  * @return void
  */
 public function register(Loader $loader)
 {
     $loader->registerFilter('filter', array($this, 'filter'));
 }