From cf44ca14cdd355cca044d4653b451703206c60c5 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 17 Mar 2007 12:55:27 +0000 Subject: added creation of application.xml --- framework/prado-cli.php | 57 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) (limited to 'framework') diff --git a/framework/prado-cli.php b/framework/prado-cli.php index c5cb7d58..39201915 100755 --- a/framework/prado-cli.php +++ b/framework/prado-cli.php @@ -245,6 +245,7 @@ class PradoCommandLineCreateProject extends PradoCommandLineAction $rootPath = realpath(dirname(trim($dir))); $basePath = $rootPath.'/'.basename($dir); + $appName = basename($basePath); $assetPath = $basePath.'/assets'; $protectedPath = $basePath.'/protected'; $runtimePath = $basePath.'/protected/runtime'; @@ -252,6 +253,7 @@ class PradoCommandLineCreateProject extends PradoCommandLineAction $indexFile = $basePath.'/index.php'; $htaccessFile = $protectedPath.'/.htaccess'; + $configFile = $protectedPath.'/application.xml'; $defaultPageFile = $pagesPath.'/Home.page'; $this->createDirectory($basePath, 0755); @@ -261,6 +263,7 @@ class PradoCommandLineCreateProject extends PradoCommandLineAction $this->createDirectory($pagesPath,0755); $this->createFile($indexFile, $this->renderIndexFile()); + $this->createFile($configFile, $this->renderConfigFile($appName)); $this->createFile($htaccessFile, $this->renderHtaccessFile()); $this->createFile($defaultPageFile, $this->renderDefaultPage()); } @@ -292,6 +295,51 @@ $application->run(); ?>'; } + protected function renderConfigFile($appName) + { + return << + + + + + + + + + + + + + + + + + + + + +EOD; + } + protected function renderHtaccessFile() { return 'deny from all'; @@ -301,7 +349,14 @@ $application->run(); protected function renderDefaultPage() { return <<Welcome to Prado! + + + Welcome to PRADO + + +

Welcome to PRADO!

+ + EOD; } } -- cgit v1.2.3