当前位置: 首页>>代码示例>>PHP>>正文


PHP event::remove_by_description方法代码示例

本文整理汇总了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.'&amp;controller='.$con['name'].'&amp'.implode('&amp;', $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 = '&#160;';
     }
     $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;
 }
开发者ID:kelubo,项目名称:OpenQRM,代码行数:101,代码来源:development.template.class.php

示例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 . '&amp;' . $plugin . '&amp;' . $controller . '&amp;' . $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 = '&#160;';
     }
     $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;
 }
开发者ID:kelubo,项目名称:OpenQRM,代码行数:101,代码来源:development.api.class.php


注:本文中的event::remove_by_description方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。