PHP plugin architecture

I plan to conduct a study on the implementation of the plugin architecture in PHP. I tried to find possible links on the Internet, but I thought that perhaps my search for good help would be faster and more appropriate if I ask here.

Has anyone here tried to use plugin architecture for web projects?

Thanks Erwin

+5
source share
5 answers

I wrote wordpress plugins, and the magic they rely on is "Variable function names." For example, this is a valid php in which the call to the phpinfo () function will be called:

$func_name="phpinfo";
$func_name();

"", . Linux "", .

, PHP , . , , O (log2 (n)). , HipHop, ++. , python, O (1), PHP HATES (, !).

!

+4

, "". , :

+1

, Zend Framework Plugin Loader.

, , , LIFO.

0

  • /
  • Plugin

  • / - Plugin.
  • Plugin.
  • Plugin , , ( - ).

, Plugin url_routes , URL.

/ URL .

0

__ autoload. . :

SomeModule::test();

function __autoload($class)
{
   $class = preg_replace('/^\W/', '', strtolower($class));
   include 'modules/'.$class.'.php';
}
0

All Articles