=========================== */
?>
exists($name)) {
return false;
}
/*echo "
==========
";
echo $name;
echo "
";*/
$index = 0;
//foreach (plugins::$instances as $plugin) {
foreach ($GLOBALS['plugins::$instances'] as $plugin) {
if(array_key_exists($index,$this->actions[$name])){
$action = $this->actions[$name][$index][1];
if (is_callable(array($plugin, $action))) {
//echo "ejecutar: ".$action."()
";
$plugin->$action();
$index++;
}
}
}
}
function exists($name) {
if (isset($this->exists[$name])) {
return $this->exists[$name];
}
//foreach (plugins::$instances as $plugin) {
foreach ($GLOBALS['plugins::$instances'] as $plugin) {
/*print_r(plugins::$instances);
echo "
";
print_r($plugin);
echo "
";
print_r($this->actions[$name]);
echo "
";
echo $this->actions[$name][0][1];
echo "
";*/
if(array_key_exists($name,$this->actions)){
if (is_callable(array($plugin, $this->actions[$name][0][1]))) {
return $this->exists[$name] = true;
}
}
}
return $this->exists[$name] = false;
}
function instance(){
//$instance;
if( !isset($GLOBALS['$instance']) ) {
$GLOBALS['$instance'] = new plugin();
}
//print_r($GLOBALS['$instance']);
//die();
return $GLOBALS['$instance'];
}
}
?>