diff options
author | xue <> | 2007-02-07 19:04:38 +0000 |
---|---|---|
committer | xue <> | 2007-02-07 19:04:38 +0000 |
commit | 154cf48db7cdc8283bbef04bf2cb88a00fd620df (patch) | |
tree | efda554620668d255343e4e6f0398adef4a9cfc7 /framework/TShellApplication.php | |
parent | 2a962765f0b687988384294cdb4baf51e291680c (diff) |
added TShellApplication.
Diffstat (limited to 'framework/TShellApplication.php')
-rw-r--r-- | framework/TShellApplication.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/framework/TShellApplication.php b/framework/TShellApplication.php new file mode 100644 index 00000000..fcb8c42c --- /dev/null +++ b/framework/TShellApplication.php @@ -0,0 +1,49 @@ +<?php
+/**
+ * TShellApplication class file
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright © 2007 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Id$
+ * @package System
+ */
+
+/**
+ * TShellApplication class.
+ *
+ * TShellApplication is the base class for developing command-line PRADO
+ * tools that share the same configurations as their Web application counterparts.
+ *
+ * A typical usage of TShellApplication in a command-line PHP script is as follows:
+ * <code>
+ * require_once('path/to/prado.php');
+ * $application=new TShellApplication('path/to/application.xml');
+ * $application->run();
+ * // perform command-line tasks here
+ * </code>
+ *
+ * Since the application instance has access to all configurations, including
+ * path aliases, modules and parameters, the command-line script has nearly the same
+ * accessibility to resources as the PRADO Web applications.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @version $Id$
+ * @package System
+ * @since 3.1.0
+ */
+class TShellApplication extends TApplication
+{
+ /**
+ * Runs the application.
+ * This method overrides the parent implementation by initializing
+ * application with configurations specified when it is created.
+ */
+ public function run()
+ {
+ $this->initApplication();
+ }
+}
+
+?>
\ No newline at end of file |