From 6f7fdef0f500cd4bb540affd3bc1482243f337c1 Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 24 Feb 2016 23:18:07 +0100 Subject: * Prado 3.3.0 --- lib/prado/framework/TShellApplication.php | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 lib/prado/framework/TShellApplication.php (limited to 'lib/prado/framework/TShellApplication.php') diff --git a/lib/prado/framework/TShellApplication.php b/lib/prado/framework/TShellApplication.php new file mode 100644 index 0000000..10844cd --- /dev/null +++ b/lib/prado/framework/TShellApplication.php @@ -0,0 +1,46 @@ + + * @link https://github.com/pradosoft/prado + * @copyright Copyright © 2005-2015 The PRADO Group + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT + * @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: + * + * require_once('path/to/prado.php'); + * $application=new TShellApplication('path/to/application.xml'); + * $application->run(); + * // perform command-line tasks here + * + * + * 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 + * @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(); + } +} + -- cgit v1.2.3