Genome::_()
Gets or sets a virtual method.
Table of Contents
Description
Genome::_(...$lot): mixed;
If this method takes only one argument, then its role is to get the data of the virtual method that was previously set. If this method takes at least two arguments, then its role is to set the data of the virtual method. If the second argument is null
, then its role is to remove the virtual method data that has been set previously.
Example
class Test extends Genome {}
Test::_('test_1', function () {});
Test::_('test_2', function () {});
Test::_('test_3', function () {});
test(Test::_()); // Gets all virtual methods data of class `Test`
test(Test::_('test_2')); // Gets `test_2` method data of class `Test`
test(Test::_('test_2', null)); // Removes `test_2` method data from class `Test`
Genome::_()
Gets or sets a virtual method.
Genome::__call()
Calls a virtual method.
Genome::__callStatic()
Calls a virtual method statically.