This repository has been archived by the owner on Aug 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95efd75
commit eef163f
Showing
22 changed files
with
346 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
return [ | ||
'components' => [ | ||
'db' => [ | ||
'class' => 'yii\db\Connection', | ||
'dsn' => 'mysql:host=localhost;dbname=ra_windowcleaning_co_uk', | ||
'username' => 'ra_windowcleaning_co_uk', | ||
'password' => 'jump22it', | ||
'charset' => 'utf8', | ||
], | ||
'mailer' => [ | ||
'class' => 'yii\swiftmailer\Mailer', | ||
'viewPath' => '@common/mail', | ||
// send all mails to a file by default. You have to set | ||
// 'useFileTransport' to false and configure a transport | ||
// for the mailer to send real emails. | ||
'useFileTransport' => true, | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
return [ | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
return yii\helpers\ArrayHelper::merge( | ||
require(__DIR__ . '/main.php'), | ||
require(__DIR__ . '/main-local.php'), | ||
require(__DIR__ . '/test.php'), | ||
[ | ||
'components' => [ | ||
'db' => [ | ||
'dsn' => 'mysql:host=localhost;dbname=yii2advanced_test', | ||
] | ||
], | ||
] | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
return [ | ||
'bootstrap' => ['gii'], | ||
'modules' => [ | ||
'gii' => 'yii\gii\Module', | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
return [ | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
$config = [ | ||
'components' => [ | ||
'request' => [ | ||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation | ||
'cookieValidationKey' => '7AZZRnYdd0mU67tW8OKaWZXHs2O10-I1', | ||
], | ||
], | ||
]; | ||
|
||
if (!YII_ENV_TEST) { | ||
// configuration adjustments for 'dev' environment | ||
$config['bootstrap'][] = 'debug'; | ||
$config['modules']['debug'] = [ | ||
'class' => 'yii\debug\Module', | ||
]; | ||
|
||
$config['bootstrap'][] = 'gii'; | ||
$config['modules']['gii'] = [ | ||
'class' => 'yii\gii\Module', | ||
]; | ||
} | ||
|
||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
return [ | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
return yii\helpers\ArrayHelper::merge( | ||
require(__DIR__ . '/../../common/config/test-local.php'), | ||
require(__DIR__ . '/main.php'), | ||
require(__DIR__ . '/main-local.php'), | ||
require(__DIR__ . '/test.php'), | ||
[ | ||
] | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
// NOTE: Make sure this file is not accessible when deployed to production | ||
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) { | ||
die('You are not allowed to access this file.'); | ||
} | ||
|
||
defined('YII_DEBUG') or define('YII_DEBUG', true); | ||
defined('YII_ENV') or define('YII_ENV', 'test'); | ||
|
||
require(__DIR__ . '/../../vendor/autoload.php'); | ||
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); | ||
require(__DIR__ . '/../../common/config/bootstrap.php'); | ||
require(__DIR__ . '/../config/bootstrap.php'); | ||
|
||
$config = require(__DIR__ . '/../config/test-local.php'); | ||
|
||
(new yii\web\Application($config))->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
defined('YII_DEBUG') or define('YII_DEBUG', true); | ||
defined('YII_ENV') or define('YII_ENV', 'dev'); | ||
|
||
require(__DIR__ . '/../../vendor/autoload.php'); | ||
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); | ||
require(__DIR__ . '/../../common/config/bootstrap.php'); | ||
require(__DIR__ . '/../config/bootstrap.php'); | ||
|
||
$config = yii\helpers\ArrayHelper::merge( | ||
require(__DIR__ . '/../../common/config/main.php'), | ||
require(__DIR__ . '/../../common/config/main-local.php'), | ||
require(__DIR__ . '/../config/main.php'), | ||
require(__DIR__ . '/../config/main-local.php') | ||
); | ||
|
||
(new yii\web\Application($config))->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
/** | ||
* Yii console bootstrap file. | ||
* | ||
* @link http://www.yiiframework.com/ | ||
* @copyright Copyright (c) 2008 Yii Software LLC | ||
* @license http://www.yiiframework.com/license/ | ||
*/ | ||
|
||
defined('YII_DEBUG') or define('YII_DEBUG', true); | ||
defined('YII_ENV') or define('YII_ENV', 'dev'); | ||
|
||
require(__DIR__ . '/vendor/autoload.php'); | ||
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); | ||
require(__DIR__ . '/common/config/bootstrap.php'); | ||
require(__DIR__ . '/console/config/bootstrap.php'); | ||
|
||
$config = yii\helpers\ArrayHelper::merge( | ||
require(__DIR__ . '/common/config/main.php'), | ||
require(__DIR__ . '/common/config/main-local.php'), | ||
require(__DIR__ . '/console/config/main.php'), | ||
require(__DIR__ . '/console/config/main-local.php') | ||
); | ||
|
||
$application = new yii\console\Application($config); | ||
$exitCode = $application->run(); | ||
exit($exitCode); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
/** | ||
* Yii console bootstrap file. | ||
* | ||
* @link http://www.yiiframework.com/ | ||
* @copyright Copyright (c) 2008 Yii Software LLC | ||
* @license http://www.yiiframework.com/license/ | ||
*/ | ||
|
||
defined('YII_DEBUG') or define('YII_DEBUG', true); | ||
defined('YII_ENV') or define('YII_ENV', 'test'); | ||
|
||
require(__DIR__ . '/vendor/autoload.php'); | ||
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); | ||
require(__DIR__ . '/common/config/bootstrap.php'); | ||
require(__DIR__ . '/console/config/bootstrap.php'); | ||
|
||
$config = yii\helpers\ArrayHelper::merge( | ||
require(__DIR__ . '/common/config/test-local.php'), | ||
require(__DIR__ . '/console/config/main.php'), | ||
require(__DIR__ . '/console/config/main-local.php') | ||
); | ||
|
||
$application = new yii\console\Application($config); | ||
$exitCode = $application->run(); | ||
exit($exitCode); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@echo off | ||
|
||
rem ------------------------------------------------------------- | ||
rem Yii command line bootstrap script for Windows. | ||
rem | ||
rem @author Qiang Xue <[email protected]> | ||
rem @link http://www.yiiframework.com/ | ||
rem @copyright Copyright (c) 2008 Yii Software LLC | ||
rem @license http://www.yiiframework.com/license/ | ||
rem ------------------------------------------------------------- | ||
|
||
@setlocal | ||
|
||
set YII_PATH=%~dp0 | ||
|
||
if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe | ||
|
||
"%PHP_COMMAND%" "%YII_PATH%yii_test" %* | ||
|
||
@endlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
/** | ||
* The manifest of files that are local to specific environment. | ||
* This file returns a list of environments that the application | ||
* may be installed under. The returned data must be in the following | ||
* format: | ||
* | ||
* ```php | ||
* return [ | ||
* 'environment name' => [ | ||
* 'path' => 'directory storing the local files', | ||
* 'skipFiles' => [ | ||
* // list of files that should only copied once and skipped if they already exist | ||
* ], | ||
* 'setWritable' => [ | ||
* // list of directories that should be set writable | ||
* ], | ||
* 'setExecutable' => [ | ||
* // list of files that should be set executable | ||
* ], | ||
* 'setCookieValidationKey' => [ | ||
* // list of config files that need to be inserted with automatically generated cookie validation keys | ||
* ], | ||
* 'createSymlink' => [ | ||
* // list of symlinks to be created. Keys are symlinks, and values are the targets. | ||
* ], | ||
* ], | ||
* ]; | ||
* ``` | ||
*/ | ||
return [ | ||
'Development' => [ | ||
'path' => 'dev', | ||
'setWritable' => [ | ||
'backend/runtime', | ||
'backend/web/assets', | ||
'frontend/runtime', | ||
'frontend/web/assets', | ||
'carty/runtime', | ||
'carty/web/assets', | ||
], | ||
'setExecutable' => [ | ||
'yii', | ||
'yii_test', | ||
], | ||
'setCookieValidationKey' => [ | ||
'backend/config/main-local.php', | ||
'frontend/config/main-local.php', | ||
'carty/config/main-local.php', | ||
], | ||
], | ||
'Production' => [ | ||
'path' => 'prod', | ||
'setWritable' => [ | ||
'backend/runtime', | ||
'backend/web/assets', | ||
'frontend/runtime', | ||
'frontend/web/assets', | ||
'carty/runtime', | ||
'carty/web/assets', | ||
], | ||
'setExecutable' => [ | ||
'yii', | ||
], | ||
'setCookieValidationKey' => [ | ||
'backend/config/main-local.php', | ||
'frontend/config/main-local.php', | ||
'carty/config/main-local.php', | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
return [ | ||
'components' => [ | ||
'db' => [ | ||
'class' => 'yii\db\Connection', | ||
'dsn' => 'mysql:host=localhost;dbname=ra_windowcleaning_co_uk', | ||
'username' => 'ra_windowcleaning_co_uk', | ||
'password' => 'jump22it', | ||
'charset' => 'utf8', | ||
], | ||
'mailer' => [ | ||
'class' => 'yii\swiftmailer\Mailer', | ||
'viewPath' => '@common/mail', | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
return [ | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
return [ | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
return [ | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
return [ | ||
'components' => [ | ||
'request' => [ | ||
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation | ||
'cookieValidationKey' => 'rtywrtwerqwerqwerqwex', | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
return [ | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
defined('YII_DEBUG') or define('YII_DEBUG', false); | ||
defined('YII_ENV') or define('YII_ENV', 'prod'); | ||
|
||
require(__DIR__ . '/../../vendor/autoload.php'); | ||
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); | ||
require(__DIR__ . '/../../common/config/bootstrap.php'); | ||
require(__DIR__ . '/../config/bootstrap.php'); | ||
|
||
$config = yii\helpers\ArrayHelper::merge( | ||
require(__DIR__ . '/../../common/config/main.php'), | ||
require(__DIR__ . '/../../common/config/main-local.php'), | ||
require(__DIR__ . '/../config/main.php'), | ||
require(__DIR__ . '/../config/main-local.php') | ||
); | ||
|
||
(new yii\web\Application($config))->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
/** | ||
* Yii console bootstrap file. | ||
* | ||
* @link http://www.yiiframework.com/ | ||
* @copyright Copyright (c) 2008 Yii Software LLC | ||
* @license http://www.yiiframework.com/license/ | ||
*/ | ||
|
||
defined('YII_DEBUG') or define('YII_DEBUG', false); | ||
defined('YII_ENV') or define('YII_ENV', 'prod'); | ||
|
||
require(__DIR__ . '/vendor/autoload.php'); | ||
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); | ||
require(__DIR__ . '/common/config/bootstrap.php'); | ||
require(__DIR__ . '/console/config/bootstrap.php'); | ||
|
||
$config = yii\helpers\ArrayHelper::merge( | ||
require(__DIR__ . '/common/config/main.php'), | ||
require(__DIR__ . '/common/config/main-local.php'), | ||
require(__DIR__ . '/console/config/main.php'), | ||
require(__DIR__ . '/console/config/main-local.php') | ||
); | ||
|
||
$application = new yii\console\Application($config); | ||
$exitCode = $application->run(); | ||
exit($exitCode); |