Libraries and helpers

Libraries are collections of classes and methods designed to help with common tasks. They are not controllers, models, or views, so they occupy some sort of unique position. Libraries are located in the /plugins/_project/library/ folder (for project-local ones) or in the /system/plugins/_global/library/ for system-wide ones. Each individual plugin can also define its own libary classes.

Like controller files, libraries must adhere to strict, standardized naming and location conventions. Files are named example.lib.php, placed in one of the proper library folders, and contain the class zajlib_example which extends zajLibExtension. Its public methods can then be invoked from anywhere by calling $this->zajlib->example->method_name();.

On the left you’ll see a list of built-in libraries, but you can also add your own library fiels by creating your own plugins.

Outlast Web & Mobile Development (c) 2023 | Privacy Policy |