Support
The mantle-framework/support
package provides a set of classes and traits that
can be used to extend the functionality of your classes/application. This
package doesn't require the rest of the framework in anyway and is a great
addition to any WordPress project.
Installation
You can install the package via Composer:
composer require mantle-framework/support
Features
The following are features included in the mantle-framework/support
package:
📄️ Collections
Mantle includes Laravel's collections package
📄️ Conditionable
Conditionable is a trait that provides a way to conditionally call a closure
📄️ Classname
Mantle includes a classname helper function that can be used to generate a CSS
📄️ Hookable
Hookable is a trait that will automatically register methods on your class with
📄️ Macroable
Macros allow you to add methods to classes from outside the class. This is
📄️ Pipeline
Mantle includes a pipeline class that uses the pipeline pattern to process a
📄️ Singleton
A singleton is a class that can only be instantiated once. It is often used to