• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP loader函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: load

function load($loader)
{
    $loader =& loader();
    $loader->add_loader($loader);
}
开发者ID:voitto,项目名称:dbscript,代码行数:5,代码来源:_functions.php


示例17: 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('routing');
class RouterCore extends RoutingLib
{
}
开发者ID:schpill,项目名称:standalone,代码行数:18,代码来源:router.php


示例18: 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('flat');
class LiteCore extends FlatLib
{
}
开发者ID:schpill,项目名称:standalone,代码行数:18,代码来源:lite.php


示例19: loader

<?php

loader()->registerNamespace("Kylewm\\Brevity", __DIR__ . '/external/brevity-php/src');
开发者ID:kylewm,项目名称:KnownTwitter,代码行数:3,代码来源:autoloader.php


示例20: loader

<?php

namespace Thin;

loader("model");
class BlazzSystemDbModel extends ModelLib
{
    /* Make hooks of model */
    public function _hooks()
    {
        $obj = $this;
        // $this->_hooks['beforeCreate'] = function () use ($obj) {};
        // $this->_hooks['beforeRead'] = ;
        // $this->_hooks['beforeUpdate'] = ;
        // $this->_hooks['beforeDelete'] = ;
        // $this->_hooks['afterCreate'] = ;
        // $this->_hooks['afterRead'] = ;
        // $this->_hooks['afterUpdate'] = ;
        // $this->_hooks['afterDelete'] = ;
        // $this->_hooks['validate'] = function () use ($data) {
        //     return true;
        // };
    }
}
开发者ID:schpill,项目名称:jsoncms,代码行数:24,代码来源:Db.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP loader_box函数代码示例发布时间:2022-05-15
下一篇:
PHP loadclasses函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap