diff --git a/.gitignore b/.gitignore index 832a890..13fcf4a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,7 @@ nbproject Thumbs.db # composer vendor dir -/yii/vendor \ No newline at end of file +/yii/vendor + +# composer itself is not needed +composer.phar diff --git a/apps/bootstrap/protected/.htaccess b/apps/bootstrap/protected/.htaccess index e019832..8d2f256 100644 --- a/apps/bootstrap/protected/.htaccess +++ b/apps/bootstrap/protected/.htaccess @@ -1 +1 @@ -deny from all +deny from all diff --git a/apps/bootstrap/protected/commands/HelloController.php b/apps/bootstrap/protected/commands/HelloController.php new file mode 100644 index 0000000..16f5f74 --- /dev/null +++ b/apps/bootstrap/protected/commands/HelloController.php @@ -0,0 +1,29 @@ + + * @since 2.0 + */ +class HelloController extends Controller +{ + /** + * This command echos what you have entered as the message. + * @param string $message the message to be echoed. + */ + public function actionIndex($message = 'hello world') + { + echo $message; + } +} \ No newline at end of file diff --git a/apps/bootstrap/protected/config/console.php b/apps/bootstrap/protected/config/console.php new file mode 100644 index 0000000..df96023 --- /dev/null +++ b/apps/bootstrap/protected/config/console.php @@ -0,0 +1,26 @@ + 'bootstrap-console', + 'basePath' => dirname(__DIR__), + 'preload' => array('log'), + 'controllerPath' => dirname(__DIR__) . '/commands', + 'controllerNamespace' => 'app\commands', + 'modules' => array( + ), + 'components' => array( + 'cache' => array( + 'class' => 'yii\caching\FileCache', + ), + 'log' => array( + 'class' => 'yii\logging\Router', + 'targets' => array( + array( + 'class' => 'yii\logging\FileTarget', + 'levels' => array('error', 'warning'), + ), + ), + ), + ), + 'params' => require(__DIR__ . '/params.php'), +); diff --git a/apps/bootstrap/protected/config/main.php b/apps/bootstrap/protected/config/main.php index f19dead..b5980da 100644 --- a/apps/bootstrap/protected/config/main.php +++ b/apps/bootstrap/protected/config/main.php @@ -1,13 +1,14 @@ 'hello', + 'id' => 'bootstrap', 'basePath' => dirname(__DIR__), 'preload' => array('log'), + 'controllerNamespace' => 'app\controllers', 'modules' => array( - 'debug' => array( - 'class' => 'yii\debug\Module', - ) +// 'debug' => array( +// 'class' => 'yii\debug\Module', +// ) ), 'components' => array( 'cache' => array( @@ -23,14 +24,15 @@ return array( 'log' => array( 'class' => 'yii\logging\Router', 'targets' => array( - 'file' => array( + array( 'class' => 'yii\logging\FileTarget', 'levels' => array('error', 'warning'), ), +// array( +// 'class' => 'yii\logging\DebugTarget', +// ) ), ), ), - 'params' => array( - 'adminEmail' => 'admin@example.com', - ), + 'params' => require(__DIR__ . '/params.php'), ); diff --git a/apps/bootstrap/protected/config/params.php b/apps/bootstrap/protected/config/params.php new file mode 100644 index 0000000..1e197d0 --- /dev/null +++ b/apps/bootstrap/protected/config/params.php @@ -0,0 +1,5 @@ + 'admin@example.com', +); \ No newline at end of file diff --git a/apps/bootstrap/protected/controllers/SiteController.php b/apps/bootstrap/protected/controllers/SiteController.php index b06ed06..534bc59 100644 --- a/apps/bootstrap/protected/controllers/SiteController.php +++ b/apps/bootstrap/protected/controllers/SiteController.php @@ -1,5 +1,7 @@ registerAssetBundle('app');
-widget('yii\debug\Toolbar'); ?> +