示例#1
0
    }
}
Testing::extend('Whoa', 'Dude');
$t = new Testing();
$t->testing();
echo "\n";
$t->testing2();
echo "\n";
echo $t->testing2();
echo "\n";
echo $t->send('testing') . ' guy';
echo "\n";
echo $t->respond_to('real_method');
echo "\n";
echo $t->respond_to('testing');
echo "\n";
echo $t->respond_to('protected_method');
echo "\n";
echo $t->respond_to('invalid');
echo "\n";
echo $t->super_test('sean');
echo "\n";
echo $t->is_a('Testing');
echo "\n";
echo $t->is_a('Invalid');
echo "\n";
// $dup = $t->dup();
// print_r($dup);
Testing::delegate('delegated', 'Dude');
$t->delegated();
$t->super();