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

Manipulating Plugin Paths

The example in the previous section shows how to add paths to a plugin loader. What if you want to determine the paths already loaded, or remove one or more?

  • getPaths($prefix = null) returns all paths as prefix / path pairs if no $prefix is provided, or just the paths registered for a given prefix if a $prefix is present.

  • clearPaths($prefix = null) will clear all registered paths by default, or only those associated with a given prefix, if the $prefix is provided and present in the stack.

  • removePrefixPath($prefix, $path = null) allows you to selectively remove a specific path associated with a given prefix. If no $path is provided, all paths for that prefix are removed. If a $path is provided and exists for that prefix, only that path will be removed.

Zend Framework