每天laravel-20160723|Application-3
2016-04-22 09:15
267 查看
/** * Resolve an array of commands through the application. * * @param array|mixed $commands * @return $this */ public function resolveCommands($commands)// function name is resolveCommands { $commands = is_array($commands) ? $commands : func_get_args();// if the commands is a array, get it or get the arguments, use a function fuc_get_args() foreach ($commands as $command) { $this->resolve($command); }// use a foreach() function to get all the callback function like use a function array_map(); return $this; }// Resolve an array of commands through the application /** * Get the default input definitions for the applications. * * This is used to add the --env option to every available command. * * @return \Symfony\Component\Console\Input\InputDefinition */ protected function getDefaultInputDefinition()// Get Default Input Definition { $definition = parent::getDefaultInputDefinition();// use parents function $definition->addOption($this->getEnvironmentOption());// addOption()// get the EvironmentOption return $definition; }// Get the default input definitions for the applications. // This is used to add the --env option to every available command. /** * Get the global environment option for the definition. * * @return \Symfony\Component\Console\Input\InputOption */ protected function getEnvironmentOption() { $message = 'The environment the command should run under.';// a message return new InputOption('--env', null, InputOption::VALUE_OPTIONAL, $message);// get the class }// Get the golobal environment option for the definition /** * Get the Laravel application instance. * * @return \Illuminate\Contracts\Foundation\Application */ public function getLaravel() { return $this->laravel; }// Get the laravel application instance.
相关文章推荐
- Swift项目引入第三方库的方法
- iOS学习笔记--01swift实现提示框第三方库:MBProgressHUD
- 浅析Objective-C的程序结构及面向对象的编程方式
- 需求驱动还是技术驱动,大跃进的聊天机器人在开着一辆往历史倒退的车
- 关于Android创建Activity需要注意的地方
- iOS 获得当前的版本号app等详解
- Swift 代码调试-善用XCode工具(UI调试,五种断点,预览UIImage...)
- object detection
- #Android#常用控件使用方法
- 64位Ubuntu配置sdk
- ios开发中动画那点事
- Android_实用技术(3)—— Service简析(I)
- Android中 一些维持状态的经验
- Swift快速入门之getter 和 setter
- Spark 基础 —— 类与伴生对象(companion object)
- 基于android的Socket通信
- Android:Activity的跳转
- Android Studio导入.so库文件方法
- 关于微信支付
- iOS中如何在欢迎界面中动态加载广告