Esempio n. 1
0
File: test3.php Progetto: atk4/core
<?php

require '../vendor/autoload.php';
class MyClass
{
    use \atk4\core\DynamicMethodTrait;
    use \atk4\core\HookTrait;
}
$c = new MyClass();
$c->addMethod('mymethod', function ($c, $a, $b) {
    return $a + $b;
});
echo $c->mymethod(2, 3) . "\n";