3 ms·
How can I add a mixin to the __ class without editing it ?
by fooyc 15y ago
How can I add a mixin to the __ class without editing it ?
- bwh2 15y agoJust copying this from the docs, but you can pass an array of functions to mixin: __::mixin(array( 'capitalize'=> function($string) { return ucwords($string); } )); __::capitalize('moe'); // 'Moe'