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


PHP event::call方法代码示例

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


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

示例1: 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

示例2: 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

示例3: assemble

 /**
  * Assemble the page and return the HTML.
  *
  * @return string
  */
 function assemble()
 {
     event::call('pageAssembly_assemble', $this);
     $output = '';
     foreach ($this->assemblyQueue as $id => $object) {
         usort($object['addBefore'], array(&$this, 'prioSortHelper'));
         foreach ($object['addBefore'] as $callback) {
             $output .= $this->call($callback['callback']);
         }
         $text = $this->call($object['callback']);
         foreach ($object['filter'] as $callback) {
             $text = $this->callFilter($callback['callback'], $text);
         }
         $output .= $text;
         foreach ($object['addBehind'] as $callback) {
             $output .= $this->call($callback['callback']);
         }
     }
     return $output;
 }
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:25,代码来源:class.pageassembly.php

示例4: array

                    $url = edkURI::page('pilot_detail', $pilot->getExternalID(), 'plt_ext_id');
                } else {
                    $url = edkURI::page('pilot_detail', $pilot->getID(), 'plt_id');
                }
                $pilots[] = array('id' => $pilot->getID(), 'extid' => $pilot->getExternalID(), 'name' => $pilot->getName(), 'portrait' => $pilot->getPortraitURL(128), 'url' => $url);
            }
        }
        $smarty->assignByRef('alliances', $alls);
        $smarty->assignByRef('corps', $corps);
        $smarty->assignByRef('pilots', $pilots);
        return $smarty->fetch(get_tpl('self'));
    }
}
if (count(config::get('cfg_allianceid')) + count(config::get('cfg_corpid')) + count(config::get('cfg_pilotid')) > 1) {
    $selfDetail = new pSelf();
    event::call("self_assembling", $selfDetail);
    $html = $selfDetail->assemble();
    $selfDetail->page->setContent($html);
    $selfDetail->page->generate();
} else {
    if (config::get('cfg_allianceid')) {
        $alls = config::get('cfg_allianceid');
        /* @var $alliance Alliance */
        $alliance = Cacheable::factory('Alliance', $alls[0]);
        if ($alliance->getExternalID()) {
            $url = edkURI::page('alliance_detail', $alliance->getExternalID(), 'all_ext_id');
        } else {
            $url = edkURI::page('alliance_detail', $alls[0], 'all_id');
        }
        header("Location: " . htmlspecialchars_decode($url));
        die;
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:self_detail.php

示例5: array

        $this->addMenuItem("link", "Lost ships", edkURI::build($args, array('view', 'losses_class', true)));
        $this->addMenuItem("caption", "Global statistics");
        $this->addMenuItem("link", "Ships & weapons", edkURI::build($args, array('view', 'ships_weapons', true)));
        $this->addMenuItem("link", "Most violent systems", edkURI::build($args, array('view', 'violent_systems', true)));
    }
    /**
     * Return the set month.
     * @return integer
     */
    function getMonth()
    {
        return $this->month;
    }
    /**
     * Return the set year.
     * @return integer
     */
    function getYear()
    {
        return $this->year;
    }
}
$allianceDetail = new pAllianceDetail();
event::call("allianceDetail_assembling", $allianceDetail);
$html = $allianceDetail->assemble();
$allianceDetail->page->setContent($html);
$allianceDetail->context();
event::call("allianceDetail_context_assembling", $allianceDetail);
$context = $allianceDetail->assemble();
$allianceDetail->page->addContext($context);
$allianceDetail->page->generate();
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:alliance_detail.php

示例6: array

        $this->addMenuItem("link", "Previous month ", edkURI::build(array('y', $pyear, true), array('m', $pmonth, true)));
        if (!($this->month == kbdate("m") - 1 && $this->year == kbdate("Y"))) {
            $this->addMenuItem("link", "Next month", edkURI::build(array('y', $nyear, true), array('m', $nmonth, true)));
        }
    }
    /**
     * Return the set month.
     * @return integer
     */
    function getMonth()
    {
        return $this->month;
    }
    /**
     * Return the set year.
     * @return integer
     */
    function getYear()
    {
        return $this->year;
    }
}
$award = new pAwards();
event::call("award_assembling", $award);
$html = $award->assemble();
$award->page->setContent($html);
$award->context();
event::call("award_context_assembling", $award);
$context = $award->assemble();
$award->page->addContext($context);
$award->page->generate();
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:awards.php

示例7: Page

        $this->page = new Page('Item Database');
    }
    function details()
    {
        global $smarty;
        if (!$this->groupID) {
            $this->page->setTitle('Error');
            return 'This ID is not a valid group ID.';
        }
        $sql = 'SELECT * FROM kb3_item_types d' . ' WHERE d.itt_id = ' . $this->groupID;
        $qry = DBFactory::getDBQuery();
        $qry->execute($sql);
        $row = $qry->getRow();
        $this->page->setTitle('Item Database - ' . $row['itt_name'] . ' Index');
        $sql = 'SELECT * FROM kb3_invtypes d' . ' WHERE d.groupID = ' . $this->groupID . ' ORDER BY d.typeName ASC';
        $qry = DBFactory::getDBQuery();
        $qry->execute($sql);
        $rows = array();
        while ($row = $qry->getRow()) {
            $rows[] = array('typeID' => $row['typeID'], 'typeName' => $row['typeName']);
        }
        $smarty->assign('rows', $rows);
        $smarty->assign('actionURL', edkURI::page('invtype'));
        return $smarty->fetch(get_tpl('groupdb'));
    }
}
$invtype = new pInvtype();
event::call("invtype_assembling", $invtype);
$html = $invtype->assemble();
$invtype->page->setContent($html);
$invtype->page->generate();
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:groupdb.php

示例8: delete

 /**
  *
  * @param string $login
  * @param string $site
  */
 public static function delete($login, $site = KB_SITE)
 {
     $qry = DBFactory::getDBQuery(true);
     $name = $qry->escape($login);
     $site = $qry->escape($site);
     $qry->execute("SELECT usr_id FROM kb3_user WHERE usr_login = '{$name}' AND usr_site = '{$site}'");
     $row = $qry->getRow();
     $usr_id = $row['usr_id'];
     $qry->execute("DELETE FROM kb3_user WHERE usr_id = {$usr_id}");
     $qry->execute("DELETE FROM kb3_user_extra WHERE use_usr_id = {$usr_id}");
     $qry->execute("DELETE FROM kb3_user_roles WHERE uro_usr_id = {$usr_id}");
     $qry->execute("DELETE FROM kb3_user_titles WHERE ust_usr_id = {$usr_id}");
     event::call("user_deleted", $login);
 }
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:19,代码来源:class.user.php

示例9:

popup| <?php 
/**
 * @package EDK
 */
$kll_id = (int) edkURI::getArg('kll_id', 1);
$kill = Cacheable::factory('Kill', $kll_id);
$html = $kill->getRawMail();
event::call("killmail_popup", $html);
$smarty->assign('rawMail', $html);
echo $smarty->fetch(get_tpl("kill_mail"));
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:10,代码来源:kill_mail.php

示例10: elseif

    {
        if ($day && $month && $year) {
            $this->setDay($day, $month, $year);
            $this->week = 0;
        } else {
            if ($week && $year) {
                $this->setWeek($week, $year);
                $this->month = 0;
            } elseif ($month && $year) {
                $this->setMonth($month, $year);
                $this->week = 0;
            } else {
                if (config::get('show_monthly')) {
                    $this->setMonth(kbdate('m'), kbdate('Y'));
                } else {
                    $this->setWeek(kbdate('W'), kbdate('o'));
                }
            }
        }
    }
}
$pageAssembly = new pHome();
event::call("home_assembling", $pageAssembly);
$html = $pageAssembly->assemble();
$pageAssembly->page->setContent($html);
$pageAssembly->context();
//This resets the queue and queues context items.
event::call("home_context_assembling", $pageAssembly);
$contextHTML = $pageAssembly->assemble();
$pageAssembly->page->addContext($contextHTML);
$pageAssembly->page->generate();
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:home.php

示例11: foreach

    if (file_exists('mods/' . $mod . '/' . $page . '.php')) {
        $modconflicts[] = $mod;
        $modOverrides = true;
        $modOverride = $mod;
    }
}
if (count($modconflicts) > 1) {
    echo "<html><head></head><body>There are multiple active mods " . "for this page. Only one may be active at a time. All others " . "must be deactivated in the admin panel.<br>";
    foreach ($modconflicts as $modname) {
        echo $modname . " <br> ";
    }
    echo "</body>";
    die;
}
$none = '';
event::call('mods_initialised', $none);
if (!$settingsPage && !file_exists('common/' . $page . '.php') && !$modOverrides) {
    $page = 'home';
}
$smarty->assign('theme_name', $themename);
$smarty->assign('theme_url', THEME_URL);
$smarty->assign('img_url', IMG_URL);
$smarty->assign('img_host', IMG_HOST);
$smarty->assign('kb_host', KB_HOST);
$smarty->assignByRef('config', $config);
$smarty->assign('is_IGB', IS_IGB);
// Set the name of the board owner.
$owners = array();
if (config::get('cfg_allianceid')) {
    foreach (config::get('cfg_allianceid') as $owner) {
        $alliance = new Alliance($owner);
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:index.php

示例12: mods

        global $smarty, $themeInfo;
        if (!isset($themeInfo)) {
            global $themename;
            $themeInfo['name'] = $themename;
        }
        $smarty->assignByRef("themeInfo", $themeInfo);
        return $smarty->fetch(get_tpl("about_theme"));
    }
    function mods()
    {
        global $smarty, $modInfo;
        $smarty->assignByRef("mods", $modInfo);
        return $smarty->fetch(get_tpl("about_mods"));
    }
    function top()
    {
        global $smarty;
        $smarty->assign('version', KB_VERSION . " " . KB_RELEASE);
        return $smarty->fetch(get_tpl('about'));
    }
    function bottom()
    {
        global $smarty;
        return $smarty->fetch(get_tpl('about_bottom'));
    }
}
$about = new pAbout();
event::call("about_assembling", $about);
$html = $about->assemble();
$about->page->setContent($html);
$about->page->generate();
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:about.php

示例13: array

        $this->addMenuItem("caption", "View");
        if ($this->adjacent) {
            $this->addMenuItem("link", "Remove adjacent", edkURI::build(array('kll_id', $this->kll_id, true)));
        } else {
            $this->addMenuItem("link", "Include adjacent", edkURI::build(array('kll_id', $this->kll_id, true), array('adjacent', true, true)));
        }
        $this->addMenuItem("link", "Back to Killmail", edkURI::build(array('a', 'kill_detail', true), array('kll_id', $this->kll_id, true)));
    }
    public function menu()
    {
        $menubox = new Box("Menu");
        $menubox->setIcon("menu-item.gif");
        foreach ($this->menuOptions as $options) {
            if (isset($options[2])) {
                $menubox->addOption($options[0], $options[1], $options[2]);
            } else {
                $menubox->addOption($options[0], $options[1]);
            }
        }
        return $menubox->generate();
    }
}
$killRelated = new pKillRelated();
event::call("killRelated_assembling", $killRelated);
$html = $killRelated->assemble();
$killRelated->page->setContent($html);
$killRelated->context();
event::call("killRelated_context_assembling", $killRelated);
$context = $killRelated->assemble();
$killRelated->page->addContext($context);
$killRelated->page->generate();
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:kill_related.php

示例14: substr

            if (preg_match("/^API/", $source)) {
                $type = "API";
                $source = $this->kill->getExternalID();
            } else {
                if (preg_match("/^http/", $source)) {
                    $type = "URL";
                } else {
                    if (preg_match("/^ID:http/", $source)) {
                        $type = "URL";
                        $source = substr($source, 3);
                    } else {
                        $type = "unknown";
                    }
                }
            }
        }
        $smarty->assign("source", htmlentities($source));
        $smarty->assign("type", $type);
        $smarty->assign("postedDate", $posteddate);
        return $smarty->fetch(get_tpl("sourcedFrom"));
    }
}
$killDetail = new pKillDetail();
event::call("killDetail_assembling", $killDetail);
$html = $killDetail->assemble();
$killDetail->page->setContent($html);
$killDetail->context();
event::call("killDetail_context_assembling", $killDetail);
$context = $killDetail->assemble();
$killDetail->page->addContext($context);
$killDetail->page->generate();
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:31,代码来源:kill_detail.php

示例15: __construct

<?php

/**
 * @package EDK
 */
class pLocked extends pageAssembly
{
    /** @var Page */
    public $page = null;
    function __construct()
    {
        parent::__construct();
        $this->queue("start");
        $this->queue("content");
    }
    function start()
    {
        $this->page = new Page("Locked");
    }
    function content()
    {
        global $smarty;
        return $smarty->fetch(get_tpl("locked"));
    }
}
$locked = new pLocked();
event::call("locked_assembling", $locked);
$html = $locked->assemble();
$locked->page->setContent($html);
$locked->page->generate();
开发者ID:biow0lf,项目名称:evedev-kb,代码行数:30,代码来源:locked.php


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