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


PHP loader函数代码示例

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


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

示例1: factory

function factory($type, $native = null)
{
    loader('dyn');
    $what = ucfirst(Inflector::camelize($type . '_factory'));
    $class = 'Thin\\' . $what;
    if (!class_exists($class)) {
        $code = 'namespace Thin; class ' . $what . ' extends DynLib {}';
        eval($code);
    }
    return new $class($native);
}
开发者ID:schpill,项目名称:standalone,代码行数:11,代码来源:helpers.php

示例2: loader

function loader($path)
{
    foreach (scandir($path) as $filename) {
        if ($filename === '.' || $filename === '..') {
            continue;
        }
        $fullPath = $path . '/' . $filename;
        if (is_file($fullPath)) {
            require_once $fullPath;
        } elseif (is_dir($fullPath)) {
            loader($fullPath);
        }
    }
}
开发者ID:wataridori,项目名称:simple-fuzzy-search,代码行数:14,代码来源:bootstrap.php

示例3: add

function add($filename, $patterns)
{
    if (!is_string($filename)) {
        throw new \Exception('$filename argument must be string');
    }
    if (is_string($patterns)) {
        $patterns = array($patterns);
    } else {
        if (!is_array($patterns)) {
            throw new \Exception('$patterns argument must be string or array');
        }
    }
    $fullPath = implode('/', fromStack());
    $fullFilename = empty($fullPath) ? $fullPath . '/' . $filename : $filename;
    $module = new Module($filename, realpath($fullFilename), $patterns);
    loader()->addModule($module);
    return $module;
}
开发者ID:noonat,项目名称:modules,代码行数:18,代码来源:modules.php

示例4: loader

<?php

/**
 * Thin is a swift Framework for PHP 5.4+
 *
 * @package    Thin
 * @version    1.0
 * @author     Gerald Plusquellec
 * @license    BSD License
 * @copyright  1996 - 2015 Gerald Plusquellec
 * @link       http://github.com/schpill/thin
 */
namespace Thin;

loader('session');
class SessionCore extends SessionLib
{
}
开发者ID:schpill,项目名称:standalone,代码行数:18,代码来源:session.php

示例5: loader

?>
"></div>
        <?/*end comments*/?>
    </div>
    <?/*form*/?>
        <?include($_SERVER['DOCUMENT_ROOT'].'/includes/product/reviews/form.php');?>
    <?/*end form*/?>

</div>
<div class="tab-content-item" id="<?php 
echo $arParams['ROUTE_STORE'];
?>
">
    <div class="container">
        <?php 
echo loader($arParams['ROUTE_STORE']);
?>
        <?/*store*/?>
        <div id="route-<?php 
echo $arParams['ROUTE_STORE'];
?>
"></div>
        <?/*end store*/?>
    </div>
</div>
</div>
</div>
<?/*end more info and tabs*/?>
</div>

开发者ID:CheBurashka334,项目名称:zakrepi,代码行数:29,代码来源:template.php

示例6: log_message

 function log_message($level = "error", $message = "")
 {
     static $_log;
     $_log =& loader("Log");
     $_log->write_function($level, $message);
 }
开发者ID:bluebellnepal,项目名称:MyFrame,代码行数:6,代码来源:Common.php

示例7: loader

<?php

/**
 * Thin is a swift Framework for PHP 5.4+
 *
 * @package    Thin
 * @version    1.0
 * @author     Gerald Plusquellec
 * @license    BSD License
 * @copyright  1996 - 2016 Gerald Plusquellec
 * @link       http://github.com/schpill/thin
 */
namespace Thin;

loader('pipeline');
class QueueCore extends PipelineLib
{
}
开发者ID:schpill,项目名称:standalone,代码行数:18,代码来源:queue.php

示例8: loader

<?php

/**
 * Thin is a swift Framework for PHP 5.4+
 *
 * @package    Thin
 * @version    1.0
 * @author     Gerald Plusquellec
 * @license    BSD License
 * @copyright  1996 - 2015 Gerald Plusquellec
 * @link       http://github.com/schpill/thin
 */
namespace Thin;

loader('misc');
class FluentCore extends MiscLib
{
}
开发者ID:schpill,项目名称:standalone,代码行数:18,代码来源:fluent.php

示例9: loader

<?php

/**
 * Thin is a swift Framework for PHP 5.4+
 *
 * @package    Thin
 * @version    1.0
 * @author     Gerald Plusquellec
 * @license    BSD License
 * @copyright  1996 - 2015 Gerald Plusquellec
 * @link       http://github.com/schpill/thin
 */
namespace Thin;

loader('ephemere');
class CacheCore extends EphemereLib
{
}
开发者ID:schpill,项目名称:standalone,代码行数:18,代码来源:cache.php

示例10: scripts

/**
 * scripts
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Loader
 * @author Henry Ruhs
 *
 * @param string $mode
 */
function scripts($mode = '')
{
    if ($mode == '') {
        $output = Redaxscript\Hook::trigger('script_start');
    }
    /* parse loader ini */
    $loader_ini = parse_ini_file('templates/' . Redaxscript\Registry::get('template') . '/scripts/.loader', 1);
    /* inherit from other templates */
    $loader_inherit = $loader_ini['inherit'];
    if ($loader_inherit) {
        foreach ($loader_inherit as $key => $template) {
            $loader_inherit_ini = parse_ini_file('templates/' . $template . '/scripts/.loader', 1);
            $loader_ini = array_merge_recursive($loader_inherit_ini, $loader_ini);
        }
    }
    $loader_minify = $loader_ini['settings']['minify'];
    /* init mode */
    if ($mode == 'init') {
        $output .= '<script> /* <![cdata[ */ ' . loader('scripts', 'init') . ' /* ]]> */ </script>' . PHP_EOL;
    } else {
        $loader_single = $loader_ini['single'];
        /* logged in */
        if (LOGGED_IN == TOKEN) {
            $loader_admin_single = $loader_ini['admin_single'];
        }
        $loader_deploy = $loader_ini['settings']['deploy'];
        /* merge loader include as needed */
        $loader_include = array();
        if ($loader_single) {
            $loader_include = array_merge($loader_include, $loader_single);
        }
        if ($loader_admin_single) {
            $loader_include = array_merge($loader_include, $loader_admin_single);
        }
        /* collect output */
        if ($loader_include) {
            foreach ($loader_include as $value) {
                $output .= '<script src="' . $value . '"></script>' . PHP_EOL;
            }
        }
        /* type of deployment */
        $output .= '<script> /* <![cdata[ */ ' . scripts_transport($loader_minify);
        if ($loader_deploy == 'inline') {
            $output .= loader('scripts', 'inline') . ' /* ]]> */ </script>' . PHP_EOL;
        } else {
            $output .= ' /* ]]> */ </script>' . PHP_EOL;
            $output .= '<script src="' . REWRITE_ROUTE . 'loader/scripts"></script>' . PHP_EOL;
        }
    }
    if ($mode == '') {
        $output .= Redaxscript\Hook::trigger('script_end');
    }
    echo $output;
}
开发者ID:amanpreetsinghmalhotra,项目名称:redaxscript,代码行数:66,代码来源:loader.php

示例11: loader

<?php

/**
 * Thin is a swift Framework for PHP 5.4+
 *
 * @package    Thin
 * @version    1.0
 * @author     Gerald Plusquellec
 * @license    BSD License
 * @copyright  1996 - 2015 Gerald Plusquellec
 * @link       http://github.com/schpill/thin
 */
namespace Thin;

loader('redys');
class RedisCore extends RedysLib
{
}
开发者ID:schpill,项目名称:standalone,代码行数:18,代码来源:redis.php

示例12: loader

<?php

/**
 * Thin is a swift Framework for PHP 5.4+
 *
 * @package    Thin
 * @version    1.0
 * @author     Gerald Plusquellec
 * @license    BSD License
 * @copyright  1996 - 2013 Gerald Plusquellec
 * @link       http://github.com/schpill/thin
 */
namespace Thin;

loader('loop');
class PromiseLib
{
    /**
     * The asynchronous operation is pending.
     */
    const PENDING = 0;
    /**
     * The asynchronous operation has completed, and has a result.
     */
    const FULFILLED = 1;
    /**
     * The asynchronous operation has completed with an error.
     */
    const REJECTED = 2;
    /**
     * The current state of this promise.
开发者ID:schpill,项目名称:standalone,代码行数:31,代码来源:promise.php

示例13: loader

<?php

/**
 * Thin is a swift Framework for PHP 5.4+
 *
 * @package    Thin
 * @version    1.0
 * @author     Gerald Plusquellec
 * @license    BSD License
 * @copyright  1996 - 2016 Gerald Plusquellec
 * @link       http://github.com/schpill/thin
 */
namespace Thin;

loader('app');
class ContainerCore extends AppLib
{
}
开发者ID:schpill,项目名称:standalone,代码行数:18,代码来源:container.php

示例14: loader

<?php

/**
 * Thin is a swift Framework for PHP 5.4+
 *
 * @package    Thin
 * @version    1.0
 * @author     Gerald Plusquellec
 * @license    BSD License
 * @copyright  1996 - 2015 Gerald Plusquellec
 * @link       http://github.com/schpill/thin
 */
namespace Thin;

loader('mailer');
class MailCore extends MailerLib
{
}
开发者ID:schpill,项目名称:standalone,代码行数:18,代码来源:mail.php

示例15: loader

<?php

/**
 * Thin is a swift Framework for PHP 5.4+
 *
 * @package    Thin
 * @version    1.0
 * @author     Gerald Plusquellec
 * @license    BSD License
 * @copyright  1996 - 2015 Gerald Plusquellec
 * @link       http://github.com/schpill/thin
 */
namespace Thin;

loader('log');
class LogCore extends LogLib
{
}
开发者ID:schpill,项目名称:standalone,代码行数:18,代码来源:log.php


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