Created
February 15, 2012 21:22
-
-
Save raphaeldealmeida/1839077 to your computer and use it in GitHub Desktop.
Composição horizontal PHP 5.3
This file contains hidden or 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 | |
class TestComponent { } | |
class SomeClass extends CBehavior{ | |
public function add($x, $y) { return $x + $y; } | |
} | |
$test_comp = new TestComponent(); | |
$test_comp->attachbehavior('blah', new SomeClass); | |
$test_comp->add(2, 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment