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


PHP event类代码示例

本文整理汇总了PHP中event的典型用法代码示例。如果您正苦于以下问题:PHP event类的具体用法?PHP event怎么用?PHP event使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了event类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: openqrm_dhcpd_appliance

function openqrm_dhcpd_appliance($cmd, $appliance_fields)
{
    global $OPENQRM_SERVER_BASE_DIR;
    global $OPENQRM_EXEC_PORT;
    $openqrm_server = new openqrm_server();
    $OPENQRM_SERVER_IP_ADDRESS = $openqrm_server->get_ip_address();
    $event = new event();
    $appliance_id = $appliance_fields["appliance_id"];
    $appliance_name = $appliance_fields["appliance_name"];
    $resource = new resource();
    $resource->get_instance_by_id($appliance_fields["appliance_resources"]);
    $resource_mac = $resource->mac;
    $resource_ip = $resource->ip;
    $appliance = new appliance();
    $appliance->get_instance_by_id($appliance_id);
    if ($resource->id == "-1" || $resource->id == "") {
        return;
    }
    $event->log("openqrm_dhcpd_appliance", $_SERVER['REQUEST_TIME'], 5, "openqrm-dhcpd-appliance-hook.php", "Handling {$cmd} event {$appliance_id}/{$appliance_name}/{$resource_ip}/{$resource_mac}", "", "", 0, 0, $resource->id);
    switch ($cmd) {
        case "start":
            $event->log("openqrm_dhcpd_appliance", $_SERVER['REQUEST_TIME'], 5, "openqrm-dhcpd-appliance-hook.php", "Adding hostname " . $appliance->name . " from resource " . $resource->id . ".", "", "", 0, 0, $resource->id);
            $dhcpd_command = $OPENQRM_SERVER_BASE_DIR . "/openqrm/plugins/dhcpd/bin/openqrm-dhcpd-appliance add_hostname -m " . $resource_mac . " -n " . $appliance->name . " -d " . $resource->id . " --openqrm-cmd-mode background";
            $openqrm_server->send_command($dhcpd_command);
            break;
        case "stop":
            $event->log("openqrm_dhcpd_appliance", $_SERVER['REQUEST_TIME'], 5, "openqrm-dhcpd-appliance-hook.php", "Removing hostname " . $appliance->name . " from resource " . $resource->id . ".", "", "", 0, 0, $resource->id);
            $dhcpd_command = $OPENQRM_SERVER_BASE_DIR . "/openqrm/plugins/dhcpd/bin/openqrm-dhcpd-appliance remove_hostname -m " . $resource_mac . " -n " . $appliance->name . " -d " . $resource->id . " --openqrm-cmd-mode background";
            $openqrm_server->send_command($dhcpd_command);
            break;
    }
}
开发者ID:kelubo,项目名称:OpenQRM,代码行数:32,代码来源:openqrm-dhcpd-appliance-hook.php

示例2: _range_panel

function _range_panel(&$app, $c)
{
    global $lang;
    $p =& $app->ui;
    $def =& $app->db->def;
    $m = array('marker_field' => 'marker');
    $p->paragraph();
    # Link to creator of new record.
    $p->v->cursor->set_key('');
    $p->open_row();
    $e = new event('tk_range_edit_select', $m);
    $e->set_next($app->event());
    $p->submit_button('select range', $e);
    $sel = tk_range_edit_all_selected($app, 'marker');
    if ($sel == 0 || $sel == 2) {
        $e = new event('tk_range_edit_select', $m);
        $e->set_next($app->event());
        $p->submit_button('select all', $e);
    }
    if ($sel == 1 || $sel == 2) {
        $e = new event('tk_range_edit_unselect', $m);
        $e->set_next($app->event());
        $p->submit_button('select all', $e);
    }
    $e_delete = new event('record_delete');
    $e_delete->set_next($app->event());
    $e = new event('tk_range_edit_call', array('view' => $e_delete, 'argname' => 'id', 'marker_field' => 'marker'));
    generic_create($app, $c);
    if ($c->have_submit_button) {
        $p->cmd_update();
    }
    $p->close_row();
    $p->paragraph();
}
开发者ID:Geopay,项目名称:dev-coin-online-shop,代码行数:34,代码来源:generic_list.php

示例3: category_overview

function category_overview(&$app)
{
    global $lang;
    $p =& $app->ui;
    $conf = new tree_edit_conf();
    $conf->source = 'directories';
    $conf->id = '1';
    $conf->treeview = $app->event();
    $conf->nodeview = 'view_pages';
    $conf->nodecreator = 'create_category';
    $conf->rootname = 'shop';
    $conf->table = 'directories';
    $conf->name = 'name';
    $conf->id = 'id';
    $conf->preset_values = array('id_directory_type' => get_directory_type_id($app->db, 'category'));
    $conf->txt_select_node = $lang['msg choose category to move'];
    $conf->txt_select_dest = $lang['msg choose dest category'];
    $conf->txt_moved = $lang['msg category moved'];
    $conf->txt_not_moved = $lang['err category not moved'];
    $conf->txt_move_again = $lang['cmd move further'];
    $conf->txt_back = $lang['cmd back/quit'];
    $conf->txt_unnamed = $lang['unnamed'];
    $e = new event('tree_edit_move', array('conf' => $conf));
    $e->set_caller($app->event());
    $p->link($lang['cmd move_category'], $e);
    tree_edit($app, $conf);
}
开发者ID:Geopay,项目名称:dev-coin-online-shop,代码行数:27,代码来源:categories.php

示例4: callback

 public function callback(event $event)
 {
     $this->message = $event->click();
     if ($this->message instanceof process) {
         $this->message->process();
     }
 }
开发者ID:flydement,项目名称:MyTest,代码行数:7,代码来源:OCP实例.php

示例5: onAfterSaveSubscriptionPlan

 /**
  * Store setting into database, in this case, use params field of plans table
  * @param event $row
  * @param Boolean $isNew true if create new plan, false if edit
  */
 function onAfterSaveSubscriptionPlan($row, $data, $isNew)
 {
     // $row of table EB_plans
     $params = new JRegistry($row->params);
     $params->set('mailchimp_list_ids', implode(',', $data['mailchimp_list_ids']));
     $row->params = $params->toString();
     $row->store();
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:13,代码来源:mailchimp.php

示例6: notifyUntil

 public function notifyUntil(event $event)
 {
     $args = func_get_args();
     foreach ($this->getListeners($event->getName()) as $listener) {
         if (call_user_func_array($listener, $args)) {
             $event->setProcessed(true);
             break;
         }
     }
     return $event;
 }
开发者ID:alexqwert,项目名称:kanon,代码行数:11,代码来源:eventDispatcher.php

示例7: saveNewEvent

 public function saveNewEvent()
 {
     Flight::auth()->check();
     $response = Flight::util()->validate('event', Flight::request()->data);
     if (is_array($response)) {
         Flight::util()->render('newEvent', array('team_id' => Flight::request()->data->team, 'error' => $response));
         return;
     }
     $event = new event(Flight::request()->data);
     $id = $event->store();
     Flight::redirect('/event/' . $id);
 }
开发者ID:happyoniens,项目名称:Club,代码行数:12,代码来源:eventController.php

示例8: _make_cmd

 function _make_cmd($cmd, $label, $handler, $args)
 {
     global $lang;
     if (!$label) {
         $label = $lang["cmd {$cmd}"];
     }
     $this->open_row_and_cell();
     $e = new event(($this->no_update || $cmd == 'delete' ? 'record' : 'form') . "_{$cmd}");
     $e->set_next($this->make_event($handler, $args));
     $this->submit_button($label, $e);
     $this->close_cell_and_row();
 }
开发者ID:Geopay,项目名称:dev-coin-online-shop,代码行数:12,代码来源:admin_panel.php

示例9: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $dataView = array();
     $dataView['page_title'] = "Eventos";
     $dataView['events'] = event::all();
     return view('event.index', $dataView);
 }
开发者ID:lautaruni,项目名称:billboard,代码行数:12,代码来源:EventController.php

示例10: delAll

 /**
  * 删除所有定时
  */
 public static function delAll()
 {
     self::$_tasks = array();
     if (self::$_event) {
         self::$_event->clearAllTimer();
     }
 }
开发者ID:shsrain,项目名称:ypyzApi,代码行数:10,代码来源:Timer.php

示例11: get_tpl

/**
 * Check if a version of this template exists in this theme or for the igb.
 * If client is igb check if theme has an igb version. If not check in default
 *  theme for one. If client is not igb check if the theme has the template.
 *  If not then again return the default template.
 *
 *  @param string $name containing the name of the template.
 */
function get_tpl($name)
{
    global $themename;
    event::call('get_tpl', $name);
    // If a specific tempate file is already asked for then simply return it.
    if (substr($name, -3) == 'tpl') {
        return $name;
    }
    if ($themename == 'default') {
        if (IS_IGB && file_exists('./themes/default/templates/igb_' . $name . '.tpl')) {
            return 'igb_' . $name . '.tpl';
        }
        return $name . '.tpl';
    } else {
        if (IS_IGB) {
            if (is_file('./themes/' . $themename . '/templates/igb_' . $name . '.tpl')) {
                return 'igb_' . $name . '.tpl';
            } else {
                if (is_file('./themes/default/templates/igb_' . $name . '.tpl')) {
                    return '../../default/templates/igb_' . $name . '.tpl';
                }
            }
        }
        if (is_file('./themes/' . $themename . '/templates/' . $name . '.tpl')) {
            return $name . '.tpl';
        } else {
            if (is_file('./themes/default/templates/' . $name . '.tpl')) {
                return '../../default/templates/' . $name . '.tpl';
            }
        }
    }
    return $name . '.tpl';
}
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:41,代码来源:globals.php

示例12: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $event = event::find($id);
     $input = Request::all();
     $event->update(['name' => $input['name']]);
     return redirect()->action('EventsController@index');
 }
开发者ID:jacqhernandez,项目名称:lsopcs,代码行数:14,代码来源:EventsController.php

示例13: logout

 public function logout()
 {
     //
     Auth::logout();
     // logout user
     return Redirect::to('/')->with('events', event::all())->with('allDayEvent', allDayEvent::all());
     //redirect back to login
 }
开发者ID:HoYinChau,项目名称:laravel,代码行数:8,代码来源:AdminHomeController.php

示例14: batch_action

 function batch_action(){
     if(front::post('batch') == 'delete'){
         $sql = "DELETE FROM `".config::get('database', 'prefix')."event`";
         $this->_table->query($sql);
         event::log('日志清除','成功');
         front::refresh(url::modify('act/manage',true));
     }
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:8,代码来源:adminlogs_admin.php

示例15: lateProcess

 public static function lateProcess()
 {
     // let all mods know we're here so they can register their functions
     event::call('xajax_initialised', $this);
     // Also register this for old mods registered to the ajax mod.
     event::call('mod_xajax_initialised', $this);
     // now process all xajax calls
     global $xajax;
     $xajax->processRequest();
 }
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:10,代码来源:xajax.php


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