當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。