An application template with few modifications.
What's added ¶
- Different configurations for applications with common configuration (main.php).
- Web-accessable files moved to
public/
. - Useful components:
- BackEndController - an advanced version of Controller for backend
- ConsoleCommand - an advanced version of CConsoleCommand
- Controller - an advanced version of CController
- LinkPager - a pager to generate this:
<< First | < Previous | 1 page of 1000 | Next > | Last >>
- DatabaseUserIdentity - a user identity class to search user with email&password in db
- FrontEndController - an advanced version of Controller for frontend
- WebModule - an advanced version of CWebModule. Allows add meta info to module.
- WebUser - an advanced version of CWebUser. Allows use alerts (setAlert(); getAlerts()) instead of flashes (setFlash(); getFlashes())
- Worker - an advanced version of gearman.AbstractWorker.
- WorkerApplication. This application is used as gearman worker. Runs with
./worker
. Worker functions are listed in protected/config/apps/gearman.php - Some gii templates.
- Some css-files (alerts.css and yii.css).
- And Deploy script (deploy.sh) and Makefile. Run
make
inside the directory.
Usage ¶
Available make goals: ¶
- setup - create writable runtime folders
- deploy - deploy files onto server
- clean - cleanup directories /protected/runtime and /public/assets
- help - show this message
How to change deploy target ¶
echo -n "user@hostname/dir/" > protected/config/local/deploy-target
How to disable deploying (use it on target server) ¶
echo -n "" > protected/config/local/deploy-target
How to make local modifications of configuration: ¶
- Create local config file for every type of application.
echo -e "<?php\nreturn array(\n);" | tee protected/config/local/{console,gearman,web}.php
- Update needed configuration file.
Interaction points ¶
Point | Access method | Application (config) | Mission |
---|---|---|---|
public/index.php | web-browser | CWebApplication (web) | Serving user requests. |
./yiic | console | CConsoleApplication (console) | Site maintenance by admin. |
./worker | console | WorkerApplication (gearman) | Doing background work. |
Yii framework is in yii directory and managable with git submodule
.
License ¶
This template licensed under the LGPL v3 license.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.