本文整理汇总了PHP中event::remove_by_description方法的典型用法代码示例。如果您正苦于以下问题:PHP event::remove_by_description方法的具体用法?PHP event::remove_by_description怎么用?PHP event::remove_by_description使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类event
的用法示例。
在下文中一共展示了event::remove_by_description方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
//.........这里部分代码省略.........
}
}
}
}
if($str !== '') {
$controllers .= '<div class="params"><b>Params</b>';
$controllers .= $str;
$controllers .= '</div>';
if($this->response->html->request()->get('plugin_name') !== '') {
$p = $this->response->html->request()->get('plugin_name');
$tag = 'plugin';
}
else if($this->response->html->request()->get('base_name') !== '') {
$p = $this->response->html->request()->get('base_name');
$tag = 'base';
}
$controllers .= '<div class="link"><b>Link:</b> ?'.$tag.'='.$p.'&controller='.$con['name'].'&'.implode('&', $url).'</div>';
}
}
}
} else {
$elem = $class->response->params;
if(is_array($elem) && count($elem) > 0) {
$str = '';
foreach($elem as $key => $e) {
$str .= '<span><strong>'.$key.'</strong></span>';
}
if($str !== '') {
$controllers .= '<div class="params"><b>Params</b>';
$controllers .= $str;
$controllers .= '</div>';
}
}
}
*/
$controllers .= '</div>';
} else {
$GLOBALS['error_action'][] = '<div><b class="error">ACTION_ERROR:</b> missing file <b>' . $file . '</b> for action ' . $value . '</div>';
}
}
}
$controllers .= '</div>';
}
}
}
$controllers .= '</div>';
}
// supernumerous files
foreach ($files as $file) {
if (strripos($file['name'], 'about') === false) {
$GLOBALS['error_action'][] = '<div><b class="error">TEMPLATE_NOTICE: </b> Found supernumerous file ' . $file['name'] . '</div>';
}
}
$controllers .= '</div>';
} else {
$oop = false;
foreach ($files as $file) {
if (strripos($file['name'], 'controller') !== false && strripos($file['name'], 'about') !== false) {
$oop = true;
$controllers = '<div>Plugin ' . $this->response->html->request()->get('plugin_name') . ' is about controller only</div>';
break;
}
}
if ($oop === false) {
$controllers = '<div>Plugin ' . $this->response->html->request()->get('plugin_name') . ' is not OOP</div>';
}
}
$template->add($controllers, 'controllers');
$template->add($legend, 'legend');
// handle errors
$phpinfo = '';
if ($this->response->html->request()->get('debug') !== '') {
if (isset($GLOBALS['error_controller']) && count($GLOBALS['error_controller']) > 0) {
$phpinfo .= implode('', $GLOBALS['error_controller']);
}
if (isset($GLOBALS['error_action']) && count($GLOBALS['error_action']) > 0) {
$phpinfo .= implode('', $GLOBALS['error_action']);
}
if (isset($GLOBALS['error_php']) && count($GLOBALS['error_php']) > 0) {
$phpinfo .= implode('', $GLOBALS['error_php']);
}
$messages = trim(ob_get_contents());
if ($messages !== '') {
$phpinfo .= '<b>HTMLOBJECTS DEBUG:</b><br>' . $messages;
}
}
// end cache
ob_end_clean();
if ($phpinfo !== '') {
$phpinfo = '<div class="phpinfobox">' . $phpinfo . '</div>';
} else {
$phpinfo = ' ';
}
$template->add($phpinfo, 'phpinfo');
$template = $this->controller->__get_navi($template, 'template');
// event cleanup, some methods creating events if constructed without parameters
$event = new event();
$event->remove_by_description('Could not create instance of');
return $template;
}
示例2: edit
//.........这里部分代码省略.........
if ($this->response->html->request()->get('plugin_name') !== '') {
$plugin = 'plugin=' . $this->response->html->request()->get('plugin_name');
$action = 'plugin';
} else {
if ($this->response->html->request()->get('base_name') !== '') {
$plugin = 'base=' . $this->response->html->request()->get('base_name');
$action = 'base';
}
}
if (count($content) > 0) {
foreach ($content as $con) {
foreach ($con as $k => $v) {
if ($k === 'name') {
$controller = 'controller=' . $v;
}
if ($k === 'methods') {
if (is_array($v)) {
$i = 0;
foreach ($v as $value) {
$css = '';
if (stripos($value, 'api') !== false && $controller !== 'controller=development') {
$file = $con['name'] . '.' . str_replace('_', '-', $value) . '.class.php';
if ($this->file->exists($path . $file)) {
$css = 'action';
if ($i === 0) {
$i++;
$css = 'action first';
}
require_once $path . $file;
$class = str_replace('.class.php', '', $file);
$class = str_replace('.', '_', $class);
$class = str_replace('-', '_', $class);
$class = new $class($con['object']);
// check lang
if (isset($con['object']->lang[$value])) {
$class->lang = $con['object']->lang[$value];
} else {
$class->lang = $con['object']->lang;
}
$t = $this->__template($path . $file);
$doc .= '<div class="link"><b>Link:</b> api.php?action=' . $action . '&' . $plugin . '&' . $controller . '&' . $con['vars']['actions_name'] . '=...</div>';
$doc .= $t->get_string();
} else {
$GLOBALS['error_action'][] = '<div><b class="error">ACTION_ERROR:</b> missing file <b>' . $file . '</b> for action ' . $value . '</div>';
}
}
}
}
}
}
}
} else {
$oop = false;
foreach ($files as $file) {
if (strripos($file['name'], 'controller') !== false && strripos($file['name'], 'about') !== false) {
$oop = true;
$doc = '<div>Plugin ' . $this->response->html->request()->get('plugin_name') . ' is about controller only</div>';
break;
}
}
if ($oop === false) {
$doc = '<div>Plugin ' . $this->response->html->request()->get('plugin_name') . ' is not OOP</div>';
}
}
if ($doc === '') {
$doc = '<div>Plugin has no API</div>';
}
$template->add($doc, 'controllers');
$template->add($legend, 'legend');
// handle errors
$phpinfo = '';
if ($this->response->html->request()->get('debug') !== '') {
if (isset($GLOBALS['error_controller']) && count($GLOBALS['error_controller']) > 0) {
$phpinfo .= implode('', $GLOBALS['error_controller']);
}
if (isset($GLOBALS['error_action']) && count($GLOBALS['error_action']) > 0) {
$phpinfo .= implode('', $GLOBALS['error_action']);
}
if (isset($GLOBALS['error_php']) && count($GLOBALS['error_php']) > 0) {
$phpinfo .= implode('', $GLOBALS['error_php']);
}
$messages = trim(ob_get_contents());
if ($messages !== '') {
$phpinfo .= '<b>HTMLOBJECTS DEBUG:</b><br>' . $messages;
}
}
// end cache
ob_end_clean();
if ($phpinfo !== '') {
$phpinfo = '<div class="phpinfobox">' . $phpinfo . '</div>';
} else {
$phpinfo = ' ';
}
$template->add($phpinfo, 'phpinfo');
$template = $this->controller->__get_navi($template, 'api');
// event cleanup, some methods creating events if constructed without parameters
$event = new event();
$event->remove_by_description('Could not create instance of');
return $template;
}