定制 jimgitsit/php-gozer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jimgitsit/php-gozer

Composer 安装命令:

composer require jimgitsit/php-gozer

包简介

A set of commonly used classes and packages.

关键字:

README 文档

README

A simple PHP framework for web sites and web services.

Gozer is a set of custom base classes and commonly used composer packages consisting of the following:

  • CoreAPI <- Base class for an API/webservice. includes an optional OAuth2 mechanism
  • CoreController <- Base class for controllers. Initializes Doctrine and Twig plus helper function common to all controllers.

The following composer packages are required by Gozer and are installed with it:

  • Doctrine ORM
  • Twig
  • OAuth2
  • Altorouter
  • KLogger (Jimgitsit fork)

Installation

From the Command Line:

composer require jimgitsit/php-gozer:dev-master

In your composer.json:

"require": {
  "jimgitsit/php-gozer": "dev-master"
}

Configuration

Copy gozer_config_template.php to <project_root>/app/config/gozer_config.php and edit as needed. Should be pretty self-explanatory.

Usage

Routing

Controllers

Views

The Twig templating engine is included with this framework by default via composer and available in controllers (that extend CoreController) via $this->twig. Template files are stored in app/views by default.

API / Webservices

API or webservice controllers should extend the CoreAPI class. If you want to use OAuth2, execute create_oauth_tables.sql on your database to add the required tables.

Models

Doctrine ORM is used for database access. Entities are stored in app/models by default. See the Doctrine documentation for a list of supported databases and usage. Controllers extending CoreController can access the EntityManager via $this->getEntityManager(). Whenever you add a new model you will need to do a #php composer.phar update to update the autoloader files.

See Also

统计信息

  • 总下载量: 308
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-03-13