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


PHP includeGuard函数代码示例

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


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

示例1: includeGuard

 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <danij@dengine.net>
 */
includeGuard('OutputCache');
class OutputCache
{
    private $content = NULL;
    public function __construct()
    {
    }
    public function start()
    {
        $this->content = 0;
        // Obliterate content.
        ob_start();
    }
    public function &stop()
    {
        $this->content = ob_get_contents();
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:outputcache.class.php

示例2: includeGuard

 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <danij@dengine.net>
 */
includeGuard('Plugins');
require_once DIR_CLASSES . '/plugin.class.php';
class Plugins implements Iterator, Countable
{
    private $_rootDir;
    private $_plugins;
    private $_position = 0;
    public function __construct($pluginDir)
    {
        // Add a trailing backslash if necessary.
        if (substr($pluginDir, -1, 1) != '/') {
            $pluginDir = $pluginDir . '/';
        }
        $this->_rootDir = $pluginDir;
        $this->detect();
    }
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:plugins.class.php

示例3: includeGuard

 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2013 Daniel Swanson <danij@dengine.net>
 */
includeGuard('MasterBrowserPlugin');
require_once DIR_CLASSES . '/masterserver.class.php';
class MasterBrowserPlugin extends Plugin implements Actioner, RequestInterpreter
{
    public static $name = 'masterbrowser';
    private $_displayOptions = 0;
    private static $baseRequestName = 'masterserver';
    private static $serverSummaryCacheName = 'masterbrowser/summary.html';
    /// Master Server instance (temporary).
    private $db;
    public function __construct()
    {
    }
    public function title()
    {
        return 'Master Server';
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:masterbrowser.php

示例4: includeGuard

 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <danij@dengine.net>
 */
includeGuard('BuildLogParser');
require_once 'buildevent.class.php';
require_once 'packagefactory.class.php';
require_once 'packages/abstractunstablepackage.class.php';
class BuildLogParser
{
    public static function parse($xmlBuildLog, &$builds)
    {
        if (!is_array($builds)) {
            throw new Exception('Invalid builds argument, array expected');
        }
        $logDom = self::constructSimpleXmlElementTree($xmlBuildLog);
        if ($logDom == FALSE) {
            throw new Exception('Failed constructing XML DOM');
        }
        if (!self::parseBuildLogDOM($logDom, $builds)) {
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:buildlogparser.class.php

示例5: includeGuard

 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <danij@dengine.net>
 */
includeGuard('AbstractUnstableBuilderPackage');
require_once 'abstractunstablepackage.class.php';
abstract class AbstractUnstableBuilderPackage extends AbstractUnstablePackage implements iBuilderProduct
{
    protected $buildId = 0;
    /// Unique.
    // Override implementation in AbstractUnstablePackage.
    public function composeFullTitle($includeVersion = true, $includePlatformName = true, $includeBuildId = true)
    {
        $includeVersion = (bool) $includeVersion;
        $includeBuildId = (bool) $includeBuildId;
        $title = $this->title;
        if ($includeVersion && isset($this->version)) {
            $title .= " {$this->version}";
        }
        if ($includeBuildId && $this->buildId !== 0) {
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:abstractunstablebuilderpackage.class.php

示例6: includeGuard

 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * <small>This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version. This program is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details. You should have received a copy of the GNU
 * General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA</small>
 */
require_once 'includes/platform.inc.php';
require_once 'includes/utilities.inc.php';
includeGuard('MasterServer');
function get_ident($info)
{
    if (!is_array($info)) {
        throw new Exception('Invalid info argument, array expected.');
    }
    if (!isset($info['at'])) {
        throw new Exception('Invalid info, parameter \'at\' not specified.');
    }
    if (!isset($info['port'])) {
        throw new Exception('Invalid info, parameter \'port\' not specified.');
    }
    return $info['at'] . ":" . $info['port'];
}
class ServerInfo implements ArrayAccess
{
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:masterserver.class.php

示例7: includeGuard

 * @file plugin.class.php
 * Abstract class which specifies the base object for all Plugins.
 *
 * @section License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <danij@dengine.net>
 */
includeGuard('Plugin');
class Plugin
{
    public static $name;
    // Abstract methods:
    public function title()
    {
    }
}
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:plugin.class.php

示例8: includeGuard

 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <danij@dengine.net>
 */
includeGuard('PackageFactory');
require_once DIR_CLASSES . '/version.class.php';
require_once 'packages/basepackage.class.php';
require_once 'packages/nullpackage.class.php';
require_once 'packages/distributionpackage.class.php';
require_once 'packages/unstabledistributionpackage.class.php';
require_once 'packages/pluginpackage.class.php';
require_once 'packages/unstablepluginpackage.class.php';
class PackageFactory
{
    private static $nullPackage = NULL;
    public static function newNullPackage()
    {
        if (!isset($nullPackage)) {
            self::$nullPackage = new NullPackage();
        }
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:packagefactory.class.php

示例9: includeGuard

 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright @ 2009-2013 Daniel Swanson <danij@dengine.net>
 */
includeGuard('ContentCache');
class ContentInfo
{
    public $modifiedTime = NULL;
}
class ContentCache
{
    private $_docRoot = NULL;
    public function __construct($docRoot = NULL)
    {
        $this->_docRoot = $docRoot . '/';
    }
    public function store($file, $content)
    {
        if (!isset($file) || $file == '' || !isset($content) || $content == '') {
            return false;
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:contentcache.class.php

示例10: includeGuard

 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2013 Daniel Swanson <danij@dengine.net>
 */
includeGuard('AddonRepositoryPlugin');
require_once 'baseaddon.class.php';
require_once 'addonsparser.class.php';
class AddonRepositoryPlugin extends Plugin implements Actioner, RequestInterpreter
{
    public static $name = 'addonrepository';
    public static $baseRequestName = 'addons';
    private $_displayOptions = 0;
    // Symbolic game mode names:
    public static $doomGameModes = array('doom1', 'doom1-ultimate', 'doom1-share', 'doom2', 'doom2-plut', 'doom2-tnt');
    public static $hereticGameModes = array('heretic', 'heretic-share', 'heretic-ext');
    public static $hexenGameModes = array('hexen', 'hexen-dk', 'hexen-demo');
    private $addons = NULL;
    public function __construct()
    {
    }
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:addonrepository.php

示例11: includeGuard

/**
 * @file unstabledistributionpackage.class.php
 *
 * @section License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <danij@dengine.net>
 */
includeGuard('DistributionUnstablePackage');
require_once 'abstractunstablebuilderpackage.class.php';
class DistributionUnstablePackage extends AbstractUnstablePackage
{
}
class DistributionUnstableBuilderPackage extends AbstractUnstableBuilderPackage
{
}
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:30,代码来源:unstabledistributionpackage.class.php

示例12: includeGuard

 *
 * @par License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * <small>This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version. This program is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details. You should have received a copy of the GNU
 * General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA</small>
 */
includeGuard('Feed');
require_once DIR_EXTERNAL . '/magpierss/rss_fetch.inc';
class FeedItem
{
    public $author;
    public $timestamp;
    // unix
    public $title;
    public $link;
    public $description;
}
class Feed implements Iterator, Countable
{
    private $feedFormat;
    private $feedUri;
    private $items;
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:feed.class.php

示例13: header

    // Should never happen as all requests are supposed to be rewritten and
    // passed to index.php
    if (count(get_included_files()) == 1) {
        header('HTTP/1.0 403 Forbidden');
        exit;
    }
    // Ensure this module is only included once.
    $moduleName = strtoupper("{$moduleName}");
    $finalModuleName = "MODULE_{$moduleName}";
    if (defined($finalModuleName)) {
        throw new Exception("Module name '{$moduleName}' already defined");
    }
    define("{$finalModuleName}", TRUE);
}
// Guard this file too.
includeGuard('platform');
/**
 * Apply assumed default PHP configuration.
 *
 * Much of the configuration done here is actually overridden at a higher
 * level however we define a default for normalization reasons.
 */
mb_internal_encoding("utf-8");
mb_http_output("utf-8");
date_default_timezone_set('Europe/London');
/**
 * @defgroup basePaths Base Paths
 * @ingroup platform
 */
///{
define('DIR_CACHE', 'cache');
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:platform.inc.php

示例14: includeGuard

 *
 * @par License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * <small>This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version. This program is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details. You should have received a copy of the GNU
 * General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA</small>
 */
includeGuard('AbstractPackage');
require_once 'basepackage.class.php';
require_once dirname(__FILE__) . '/../downloadable.interface.php';
require_once dirname(__FILE__) . '/../builderproduct.interface.php';
abstract class AbstractPackage extends BasePackage implements iDownloadable
{
    protected static $emptyString = '';
    protected $directDownloadUri = NULL;
    protected $directDownloadFallbackUri = NULL;
    protected $releaseNotesUri = NULL;
    protected $releaseChangeLogUri = NULL;
    protected $releaseDate = 0;
    protected $compileLogUri = NULL;
    protected $compileWarnCount = NULL;
    protected $compileErrorCount = NULL;
    public function __construct($platformId = PID_ANY, $title = NULL, $version = NULL, $directDownloadUri = NULL, $directDownloadFallbackUri = NULL, $releaseDate = 0)
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:31,代码来源:abstractpackage.class.php

示例15: includeGuard

<?php

/**
 * @file builderproduct.interface.php
 * Abstract interface for objects which provide "BuilderProduct" functionality.
 *
 * @authors Copyright @ 2009-2013 Daniel Swanson <danij@dengine.net>
 *
 * @par License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * <small>This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version. This program is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details. You should have received a copy of the GNU
 * General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA</small>
 */
includeGuard('iBuilderProduct');
interface iBuilderProduct
{
    public function setBuildUniqueId($id);
    public function buildUniqueId();
}
开发者ID:laszloekovacs,项目名称:Doomsday-Engine,代码行数:28,代码来源:builderproduct.interface.php


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