-
Notifications
You must be signed in to change notification settings - Fork 10
Module
Stefano Azzolini edited this page Aug 29, 2014
·
1 revision
The Module trait provides a way to extend classes, even static with new methods.
class Test {
use Module;
public static function Foo(){ echo "Foo"; }
}
Test::Foo(); // Foo
Test::Bar(); // Fatal error: Call to undefined method Test::Bar
Test::extend([
'Bar' => function(){ echo "Bar"; },
]);
Test::Bar(); // Bar
Core is maintained by using the Semantic Versioning Specification (SemVer).
Copyright 2014-2016 Caffeina srl under the MIT license.
http://caffeina.com