PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Utility Methods

Zend_Filter_Inflector has a number of utility methods for retrieving and setting the plugin loader, manipulating and retrieving rules, and controlling if and when exceptions are thrown.

  • setPluginLoader() can be used when you have configured your own plugin loader and wish to use it with Zend_Filter_Inflector; getPluginLoader() retrieves the currently set one.

  • setThrowTargetExceptionsOn() can be used to control whether or not filter() throws an exception when a given replacement identifier passed to it is not found in the target. By default, no exceptions are thrown. isThrowTargetExceptionsOn() will tell you what the current value is.

  • getRules($spec = null) can be used to retrieve all registered rules for all variables, or just the rules for a single variable.

  • getRule($spec, $index) fetches a single rule for a given variable; this can be useful for fetching a specific filter rule for a variable that has a filter chain. $index must be passed.

  • clearRules() will clear all currently registered rules.

Zend Framework