class AppShell
AppShell可以用作基类为你所有的Shell。它应该延长Shell,位于Console/Command/AppShell.php
class Shell($stdout = null, $stderr = null, $stdin = null)
Shell的基类,提供了大量的交互功能用户输入,输出文本生成错误。
property Shell::$tasks
property Shell::$uses
Shell::clear()
Shell::createFile($path, $contents)
创建一个文件在给定的路径。如果交互式Shell,会产生一个警告,用户要求如果他们想要覆盖该文件是否已经存在。如果是假的shell的互动属性,毫无疑问将被要求和文件将被覆盖。
Shell::dispatchShell()
调度命令另一个shells。类似于Controller::requestAction(),但用于运行从其他shells。
Shell::err($message = null, $newlines = 1)
Parameters:
$method (string) – The message to print.
$newlines (integer) – The number of newlines to follow the message.
Outputs a method to stderr, works similar to Shell::out()
Shell::error($title, $message = null)
Parameters:
$title (string) – Title of the error
$message (string) – An optional error message