Ads 468 X 60

Class Mutations Dynamically Add Methods

PHP Scripts – Class Mutations – Dynamically Add Methods | CodeCanyon


Class Mutations Dynamically Add Methods his title this type of PHPScripts/Miscellaneous This time I will review,made by afflicto, PHPScripts/Miscellaneous is sold at a price of $5 in themeforest.

Class Mutations - Dynamically Add Methods - CodeCanyon Item for Sale

PHP Traits // add class methods // class morph // dynamic method // metamorphosis // method morph // mutable // mutable class // mutation // mutation class // php // php 5.4 // php5 // remove class methods // trait //





















Created11 August 13
Last Update11 August 13
Software VersionPHP 5.3, PHP 5.4
Files IncludedPHP




What’s this?


A pack of three classes that enables you to dynamically add new methods to a class or object using closures (anonymous functions). Both static and instance methods can be added.


Why?


If you’re developing a website or web application that needs to be modular or perhaps provide an API for plugin/module development, this mutations system can be very useful in providing flexibility.


What’s included?


Included in the zip file is an examples directory with four commented PHP example files that show you what’s possible and the different implementations available to your version of PHP.


There are three classes, plus a trait. If you’re on PHP version 5.4 or later, I recommend using the trait, it’s a simple one-liner (or a three-liner if you need to implement your own __call and __callStatic methods)


Need any help?


If you need any help or have any questions, feel free to give me a comment or send me message via email.


Cheers!



Related produck This user:afflicto


HTML Layout & Utility Class - CodeCanyon Item for Sale Event/Hook class - CodeCanyon Item for Sale







More items by afflicto


0 comments:

Post a Comment