console模式

This commit is contained in:
thinkphp
2016-01-30 09:53:36 +08:00
parent d4fbec83a1
commit 4e2621e0c8
39 changed files with 7656 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
<?php
// +----------------------------------------------------------------------
// | TopThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://www.topthink.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: zhangyajun <448901948@qq.com>
// +----------------------------------------------------------------------
namespace think\console\helper;
use think\console\helper\descriptor\Descriptor as OutputDescriptor;
use think\console\Output;
class Descriptor extends Helper
{
/**
* @var OutputDescriptor
*/
private $descriptor;
/**
* 构造方法
*/
public function __construct()
{
$this->descriptor = new OutputDescriptor();
}
/**
* 描述
* @param Output $output
* @param object $object
* @param array $options
* @throws \InvalidArgumentException
*/
public function describe(Output $output, $object, array $options = [])
{
$options = array_merge([
'raw_text' => false
], $options);
$this->descriptor->describe($output, $object, $options);
}
/**
* {@inheritdoc}
*/
public function getName()
{
return 'descriptor';
}
}