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

PHP make函数代码示例

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

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



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

示例1: get

 public static function get($class = null)
 {
     if ($class) {
         return make($class);
     }
     return $this->class ? make($this->class) : null;
 }
开发者ID:ZhangHarvey,项目名称:hzf,代码行数:7,代码来源:Instance.php


示例2: getAction

 public function getAction() : callable
 {
     if ($this->resolvedAction !== null) {
         return $this->resolvedAction;
     }
     if (!$this->routeAction instanceof ControllerCallback) {
         return $this->resolvedAction = $this->routeAction;
     }
     /** @var ControllerCallback $callback */
     $callback = $this->routeAction;
     $router = app()->getHttpRouter();
     $values = $router->bind($router->extract($router->getContext(), $this), $this->getBindings());
     $method = $callback->getMethod();
     $class = $callback->getClass();
     if ($class[0] === '@') {
         $class = substr($class, 1);
         if (!isset($values[$class])) {
             throw new \RuntimeException("Unknown controller variable '{$class}'");
         }
         $class = $values[$class]->value();
     }
     if ($method[0] === '@') {
         $method = substr($method, 1);
         if (!isset($values[$method])) {
             throw new \RuntimeException("Unknown controller variable '{$method}'");
         }
         $method = $values[$method]->value();
     }
     if (!$callback->isStatic()) {
         $class = make($class);
     }
     return $this->resolvedAction = [$class, $method];
 }
开发者ID:opis,项目名称:colibri,代码行数:33,代码来源:HttpRoute.php


示例3: init

 public function init()
 {
     if (!$this->engine instanceof StorageContract) {
         $this->engine = make($this->engine);
     }
     $this->engine->timeout($this->expires);
 }
开发者ID:hanfengyang,项目名称:framework,代码行数:7,代码来源:Manager.php


示例4: init

 public function init()
 {
     $this->monolog = new MonoLogger($this->name);
     foreach ($this->targets as &$target) {
         $target = make($target);
         $this->monolog->pushHandler($target);
     }
 }
开发者ID:hanfengyang,项目名称:framework,代码行数:8,代码来源:Logger.php


示例5: init

function init()
{
    $arg = array_slice($_SERVER['argv'], 1);
    $arg = $arg ? $arg[0] : '';
    if (in_array($arg, array('?', 'help'))) {
        exit("make.php\n");
    }
    make();
}
开发者ID:jkrecek,项目名称:coffeescript-php,代码行数:9,代码来源:make.php


示例6: handleStart

 protected function handleStart()
 {
     $pidFile = $this->blink->root . '/runtime/server.pid';
     if (file_exists($pidFile)) {
         throw new InvalidValueException('The pidfile exists, it seems the server is already started');
     }
     $server = (require $this->blink->root . '/src/config/server.php');
     $server['asDaemon'] = 1;
     $server['pidFile'] = $this->blink->root . '/runtime/server.pid';
     return make($server)->run();
 }
开发者ID:renyinew,项目名称:blink,代码行数:11,代码来源:ServerCommand.php


示例7: handleStart

 /**
  *   monitorserver start 命令
  * 
  * @return mixed
  * @throws \Kerisy\Core\InvalidConfigException
  */
 protected function handleStart()
 {
     $pidFile = APPLICATION_PATH . '/runtime/monitorserver.pid';
     if (file_exists($pidFile)) {
         throw new InvalidValueException('The pidfile exists, it seems the server is already started');
     }
     $server = config('monitorservice')->all();
     $server['asDaemon'] = 1;
     $server['pidFile'] = APPLICATION_PATH . '/runtime/monitorserver.pid';
     return make($server)->run();
 }
开发者ID:kerisy,项目名称:framework,代码行数:17,代码来源:MonitorServerCommand.php


示例8: handleStart

 protected function handleStart()
 {
     $server = $this->getServerDefinition();
     $pidFile = !empty($server['pidFile']) ? $server['pidFile'] : $this->blink->runtime . '/server.pid';
     if (file_exists($pidFile)) {
         throw new InvalidValueException('The pidfile exists, it seems the server is already started');
     }
     $server['asDaemon'] = 1;
     $server['pidFile'] = $pidFile;
     return make($server)->run();
 }
开发者ID:bixuehujin,项目名称:blink,代码行数:11,代码来源:ServerCommand.php


示例9: calling

 public function calling()
 {
     if ($this->params['supplier'] == 33) {
         $res = $this->sql->table_exist('v8_sorted');
         if (!$res) {
             make($this->sql);
         }
         return $this->sql->getByPage('v8_sorted', $this->params['start'], $this->params['limit'], ' 1 ORDER BY brand ASC, model ASC ');
     }
     return false;
 }
开发者ID:herrlosxxx,项目名称:test_parser,代码行数:11,代码来源:core.php


示例10: init

 public function init()
 {
     foreach ($this->loaders as $format => $loader) {
         $loader = make($loader);
         $this->addLoader($format, $loader);
     }
     foreach ($this->resources as $resource) {
         if (!isset($resource['format'], $resource['resource'], $resource['locale'])) {
             throw new InvalidParamException('The resource item requires format, resource and locale keys.');
         }
         $this->addResource($resource['format'], $resource['resource'], $resource['locale'], isset($resource['domain']) ? $resource['domain'] : null);
     }
 }
开发者ID:bixuehujin,项目名称:blink-i18n,代码行数:13,代码来源:Translator.php


示例11: handleStart

 protected function handleStart()
 {
     $pidFile = APPLICATION_PATH . 'runtime/server.pid';
     if (file_exists($pidFile)) {
         throw new InvalidValueException('The pidfile exists, it seems the server is already started');
     }
     $server = config('service')->all();
     $server['asDaemon'] = 1;
     $server['pidFile'] = APPLICATION_PATH . 'runtime/server.pid';
     $serv = make($server);
     isset($this->getAliases()['alias_name']) && $serv->setAliasName($this->getAliases()['alias_name']);
     return $serv->run();
 }
开发者ID:kerisy,项目名称:framework,代码行数:13,代码来源:ServerCommand.php


示例12: get

 /**
  * @param string $name
  * @return bool|ValidatorInterface
  */
 public function get(string $name)
 {
     if (!isset($this->validators[$name])) {
         if (isset($this->classes[$name])) {
             $validator = make($this->classes[$name]);
             if (!$validator instanceof ValidatorInterface) {
                 return false;
             }
             return $this->validators[$name] = $validator;
         }
     }
     return isset($this->validators[$name]) ? $this->validators[$name] : false;
 }
开发者ID:opis,项目名称:colibri,代码行数:17,代码来源:ValidatorCollection.php


示例13: run

 public function run()
 {
     $app = $this->startApp();
     $runner = new \blink\core\console\Application(['name' => 'Blink Command Runner', 'version' => Application::VERSION, 'blink' => $app]);
     foreach ($app->consoleCommands() as $command) {
         if (is_string($command)) {
             $command = ['class' => $command];
         }
         $command['blink'] = $app;
         $runner->add(make($command));
     }
     return $runner->run(new ArgvInput(), new ConsoleOutput());
 }
开发者ID:bixuehujin,项目名称:blink,代码行数:13,代码来源:CliServer.php


示例14: callMiddleware

 /**
  * Call the middleware stack.
  *
  * @throws InvalidConfigException
  */
 public function callMiddleware()
 {
     if ($this->_middlewareCalled) {
         return;
     }
     foreach ($this->middleware as $definition) {
         $middleware = make($definition);
         if (!$middleware instanceof MiddlewareContract) {
             throw new InvalidConfigException(sprintf("'%s' is not a valid middleware", get_class($middleware)));
         }
         if ($middleware->handle($this) === false) {
             break;
         }
     }
     $this->_middlewareCalled = true;
 }
开发者ID:hanfengyang,项目名称:framework,代码行数:21,代码来源:MiddlewareTrait.php


示例15: run

/**
 * make (All component)
 */
function run()
{
    global $do_chown, $builds_dir, $tests_path, $user, $jobs_dir, $jobs_tmp_dir;
    foreach (new DirectoryIterator($tests_path) as $d) {
        $name = null;
        $component = null;
        $tests = null;
        $replace_phpunitxml = false;
        if ($d->isDot() || $d->isDir() && in_array($d, array('AllTests', '_files'))) {
            continue;
        }
        if ($d->isFile() && in_array($d->getFileName(), array('DebugTest.php', 'RegistryTest.php', 'VersionTest.php'))) {
            $component = substr($d->getFilename(), 0, -8);
            $tests = "../../tests/Zend/" . $d->getFileName();
            make($component, $tests, $user, $do_chown, true, $component . '.php');
            make_job($component, $builds_dir, $jobs_tmp_dir, $user, $do_chown);
        } else {
            if ($d->getFilename() == 'Service') {
                foreach (new DirectoryIterator($d->getRealpath()) as $s) {
                    if ($s->isDot()) {
                        continue;
                    }
                    $component = "Service" . $s->getFilename();
                    $tests = "../../tests/Zend/Service/" . $s->getFilename();
                    make($component, $tests, $user, $do_chown, false, "Service/" . $s->getFilename());
                    make_job($component, $builds_dir, $jobs_tmp_dir, $user, $do_chown);
                }
            } else {
                $component = $d->getFilename();
                $tests = "../../tests/Zend/" . $d->getFileName();
                make($component, $tests, $user, $do_chown, false, $d->getFilename());
                make_job($component, $builds_dir, $jobs_tmp_dir, $user, $do_chown);
            }
        }
    }
}
开发者ID:eltonoliveira,项目名称:zf2-jenkins-builds,代码行数:39,代码来源:zf2-jenkins-builds.php


示例16: handleConsole

 public function handleConsole($input, $output)
 {
     $app = new \Kerisy\Core\Console\Application(['name' => 'Kerisy Command Runner', 'version' => self::VERSION, 'kerisy' => $this]);
     $commands = array_merge($this->commands, ['Kerisy\\Console\\ServerCommand', 'Kerisy\\Console\\ShellCommand', 'Kerisy\\Rpc\\Console\\RpcServerCommand', 'Kerisy\\Job\\JobServerCommand', 'Kerisy\\Console\\PHPCsCommand', 'Kerisy\\Monitor\\Console\\MonitorServerCommand']);
     foreach ($commands as $command) {
         $app->add(make(['class' => $command, 'kerisy' => $this]));
     }
     return $app->run($input, $output);
 }
开发者ID:kerisy,项目名称:framework,代码行数:9,代码来源:Application.php


示例17: public_showmsg_two

function public_showmsg_two($uid)
{
    global $_MooClass, $dbTablePre, $timestamp, $memcached, $user_arr;
    $time = time();
    $lastmake = $memcached->get('lastmake' . $GLOBALS['MooUid']);
    //echo "<br />".$lastmake;
    //if(($lastmake+3)>$time){
    $get_visitor_uid = $_MooClass['MooMySQL']->getOne("select uid from {$dbTablePre}service_visitor where  visitorid={$uid} and who_del!=2 and visitortime>" . (time() - 600) . " and visitortime < " . (time() - 60) . " order by visitortime desc limit 1");
    if ($get_visitor_uid) {
        if (MOOPHP_ALLOW_FASTDB) {
            $msg = MooFastdbGet('members_search', 'uid', $get_visitor_uid['uid']);
        } else {
            $sql = "SELECT * FROM {$dbTablePre}members_search where uid='{$get_visitor_uid['uid']}'";
            $msg = $_MooClass['MooMySQL']->query($sql);
        }
    } else {
        //note 伪造
        if ($user_arr['s_cid'] == 40) {
            make($uid, 1);
        } else {
            make($uid, 2);
        }
    }
    //}
    //}
    if ($msg) {
        return $msg;
    } else {
        return 0;
    }
}
开发者ID:noikiy,项目名称:zays,代码行数:31,代码来源:ajax.php


示例18: commit

     break;
 case 'commit-help':
     commit(true);
     break;
 case 'extract':
     xtract();
     break;
 case 'init':
     init();
     $c->writeln();
     merge();
     break;
 case 'make':
     cleanup(true);
     $c->writeln();
     make();
     break;
 case 'make-help':
     make_help();
     break;
 case 'update':
     xtract();
     $c->writeln();
     merge();
     break;
 case 'update-help':
     update_help();
     break;
 case 'status':
     //        xtract();
     merge();
开发者ID:Artea,项目名称:freebeer,代码行数:31,代码来源:translation.php


示例19: createSession

 protected function createSession()
 {
     return make(['class' => Session::class, 'storage' => ['class' => FileStorage::class, 'path' => $this->sessionPath]]);
 }
开发者ID:CodeApePro,项目名称:blink,代码行数:4,代码来源:SessionTest.php


示例20: execute

 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $server = (require $this->blink->root . '/src/config/server.php');
     return make($server)->run();
 }
开发者ID:CodeApePro,项目名称:blink,代码行数:5,代码来源:ServeCommand.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP makeArray函数代码示例发布时间:2022-05-15
下一篇:
PHP maj_version函数代码示例发布时间: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