2017 © Pedro Peláez
 

library php-gozer

A set of commonly used classes and packages.

image

jimgitsit/php-gozer

A set of commonly used classes and packages.

  • Thursday, August 25, 2016
  • by jimpacksit
  • Repository
  • 1 Watchers
  • 0 Stars
  • 253 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 7 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

php-gozer

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:, (*1)

  • 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:, (*2)

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

Installation

From the Command Line:, (*3)

composer require jimgitsit/php-gozer:dev-master

In your composer.json:, (*4)

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

Configuration

Copy gozer_config_template.php to /app/config/gozer_config.php and edit as needed. Should be pretty self-explanatory., (*5)

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., (*6)

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., (*7)

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., (*8)

See Also

  • Composer: https://getcomposer.org/doc/
  • Doctrine: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/
  • Twig: http://twig.sensiolabs.org/documentation
  • AltoRouter: https://github.com/dannyvankooten/AltoRouter

The Versions

25/08 2016

2.0.x-dev

2.0.9999999.9999999-dev

A set of commonly used classes and packages.

  Sources   Download

The Requires

 

by Jim McGowen

framework

11/07 2016

1.0.x-dev

1.0.9999999.9999999-dev

A set of commonly used classes and packages.

  Sources   Download

The Requires

 

by Jim McGowen

framework

11/07 2016

dev-master

9999999-dev

A set of commonly used classes and packages.

  Sources   Download

The Requires

 

by Jim McGowen

framework