Download the PHP package imponeer/smarty-extensions-contracts without Composer
On this page you can find all versions of the php package imponeer/smarty-extensions-contracts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download imponeer/smarty-extensions-contracts
More information about imponeer/smarty-extensions-contracts
Files in imponeer/smarty-extensions-contracts
Package smarty-extensions-contracts
Short Description Interfaces for defining smarty template engine extensions in object way
License MIT
Informations about the package smarty-extensions-contracts
Smarty Extensions Contracts
Smarty 3 still doesn't use classes for define most of the possible extensions types. This library tries to fix that - it provides all needed interfaces to define extensions in object way.
Defining smarty extensions in object way also can be useful when working with containers. Smarty extensions that could be registered with tags and then loaded when needed.
Installation
To install and use this package, we recommend to use Composer:
Otherwise, you need to include manually files from src/
directory.
Mapping
Extension type | Interface name | What it for? |
---|---|---|
Template Function | \Imponeer\Contracts\Smarty\Extension\SmartyFunctionInterface | Interface that lets to define smarty function extension |
Modifier | \Imponeer\Contracts\Smarty\Extension\SmartyModifierInterface | Interface that lets to define smarty function extension |
Block Function | \Imponeer\Contracts\Smarty\Extension\SmartyBlockInterface | Extension interface for smarty block functions |
Compiler Function | \Imponeer\Contracts\Smarty\Extension\SmartyCompilerInterface | Interface that lets to define smarty compiler extension (that is not internal function based) |
Prefilter | \Imponeer\Contracts\Smarty\Filter\SmartyPreFilterInterface | Defines filter that is executed to process template source before compilation |
Postfilter | \Imponeer\Contracts\Smarty\Filter\SmartyPostFilterInterface | Defines filter that is executed to process template source after compilation |
Output filter | \Imponeer\Contracts\Smarty\Filter\SmartyOutputFilterInterface | Defines filter that is executed before template is loaded and executed but before displayed |
Resource | \Imponeer\Contracts\Smarty\Extension\SmartyResourceInterface | Defines custom smarty resource type |
How to contribute?
If you want to add some functionality or fix bugs, you can fork, change and create pull request. If you not sure how this works, try interactive GitHub tutorial.
If you found any bug or have some questions, use issues tab and write there your questions.