added ability to create own "yiic create" templates

This commit is contained in:
Alexander Makarov
2012-12-26 15:41:50 +04:00
parent d59f6c00b8
commit 78ab5c654a
3 changed files with 126 additions and 56 deletions

View File

@@ -0,0 +1,20 @@
<?php
/** @var $controller \yii\console\controllers\CreateController */
$controller = $this;
return array(
'default' => array(
'index.php' => array(
'handler' => function($source) use ($controller) {
return $controller->replaceRelativePath($source, realpath(YII_PATH.'/yii.php'), 'yii');
},
'permissions' => 0777,
),
'assets' => array(
'permissions' => 0777,
),
'protected/runtime' => array(
'permissions' => 0755,
),
),
);

View File

@@ -1 +1,8 @@
<?php
// change the following paths if necessary
$yii=__DIR__.'/../framework/yii.php';
$config=__DIR__.'/protected/config/main.php';
require_once($yii);
Yii::createWebApplication($config)->run();