Armory PHP Closure Trait: Cache, rename and hide anonymous functions

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (2)    
Last Updated Ratings Unique User Downloads Download Rankings
2020-08-20 (2 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 129 This week: 3All time: 9,103 This week: 48Up
Version License PHP version Categories
armory 1.0.0Freeware7Language, Design Patterns, PHP 7, Traits
Description Author

This package provides a trait to cache, rename and hide your anonymous and callback functions in a class object instance.

It provides a protected array to store the functions under a different name.

By declaring the functions as properties of the class object, getter and setter methods take care of the hiding. The executing scope is preserved.

The trait can be used to gather all callback functions and store them in a protected variable to avoid name collisions.

It can also make class functions available without the necessity of retrieving the object instances first.

Innovation Award
PHP Programming Innovation award nominee
August 2020
Number 3
Some classes need to implement a callback system that allows applications to customize actions to be executed when certain events happen inside the class.

This package provides a trait that can be used to quickly add callback function registration and invocation for any number of types of events that a class may trigger.

Manuel Lemos
Picture of wim niemans
  Performance   Level  
Name: wim niemans <contact>
Classes: 3 packages by
Country: The Netherlands The Netherlands
Age: 70
All time rank: 385896 in The Netherlands The Netherlands
Week rank: 42 Up3 in The Netherlands The Netherlands Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Plain text file armory.php Class Armory Trait
Accessible without login Plain text file demo.php Example Armory Demo

 Version Control Unique User Downloads Download Rankings  
 0%
Total:129
This week:3
All time:9,103
This week:48Up

For more information send a message to info at phpclasses dot org.