yii-app-skeleton An yii application template.

  1. What's added
  2. Usage
  3. Interaction points
  4. License
  5. Resources

An application template with few modifications.

What's added

  1. Different configurations for applications with common configuration (main.php).
  2. Web-accessable files moved to public/.
  3. 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.
  4. WorkerApplication. This application is used as gearman worker. Runs with ./worker. Worker functions are listed in protected/config/apps/gearman.php
  5. Some gii templates.
  6. Some css-files (alerts.css and yii.css).
  7. 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:
  1. Create local config file for every type of application. echo -e "<?php\nreturn array(\n);" | tee protected/config/local/{console,gearman,web}.php
  2. 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.

Resources

1 0
3 followers
180 downloads
Yii Version: 1.1
License: LGPL-3.0
Category: Others
Developed by: wapmorgan
Created on: Mar 9, 2014
Last updated: 9 years ago

Downloads

show all