Shell API 的一些说明

来源:互联网 发布:java大数据框架 编辑:程序博客网 时间:2024/06/08 02:28
class AppShell
AppShell可以用作基类为你所有的Shell。它应该延长Shell,位于Console/Command/AppShell.php
class Shell($stdout = null, $stderr = null, $stdin = null)
Shell的基类,提供了大量的交互功能用户输入,输出文本生成错误。
property Shell::$tasksproperty Shell::$usesShell::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


0 0
原创粉丝点击