Created
January 16, 2012 20:19
-
-
Save munro/1622768 to your computer and use it in GitHub Desktop.
PHP Class DSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$MyClass = $createClass(function () { | |
inherit($BaseClass); | |
mixin($OtherClass); | |
$this->my_var = 123; | |
decorate($someFunction); | |
$this->__construct = function ($self) { | |
$MyClass->$parent->__construct->call($self); | |
$createClass->super($MyClass, $self)->__construct('a', 'b', 'c'); | |
}; | |
decorate($someFunction); | |
function somevar($self) { | |
} | |
decorate($someFunction); | |
function hello($self) { | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment