wyanez / zf2-doctrine-skeleton
Skeleton Application for ZF2 and Doctrine
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Language:CSS
Requires
- php: >=5.4
- doctrine/doctrine-module: dev-master
- doctrine/doctrine-orm-module: dev-master
- wyanez/zf2-doctrine-base: dev-master
- zendframework/zendframework: 2.3.*
Requires (Dev)
- firephp/firephp-core: dev-master
- zendframework/zend-developer-tools: dev-master
- zendframework/zftool: dev-master
This package is not auto-updated.
Last update: 2023-09-25 23:06:18 UTC
README
Introduction
This is a simple, skeleton application using the ZF2 MVC layer and module systems and Doctrine2 ORM Layer. This application is meant to be used as a starting place for those looking to get their feet wet with ZF2 and Doctrine2 ORM Layer. Contains base classes: BaseDoctrineController, BaseDoctrineForm, BaseDoctrineModel and BaseDoctrineEntity and thus facilitate the development of your application.
Installation
Simply clone this project and run
$ php composer.phar install
Post-Installation
- Create
doctrine.local.php
:cp autoload/doctrine.local{.php.dist,.php}
- Edit
doctrine.local.php
and set your params of conexion to database in $dbParams array. - Create your entities and place it in the folder
module\Application\src\Application\Entity
, this entities must belong at namespace\Application\Entity
- Optional: Activate
ZendDeveloperTools
:
$ cp config/autoload/zenddevelopertools.local{.php.dist,.php}
Activate the module ZendDeveloperTools in the section 'modules' of file `config\application.config`, uncoment the line //'ZendDeveloperTools'.
Web Server Setup
PHP CLI Server
The simplest way to get started if you are using PHP 5.4 or above is to start the internal PHP cli-server in the root directory:
php -S 0.0.0.0:8080 -t public/ public/index.php
This will start the cli-server on port 8080, and bind it to all network interfaces.
**Note: ** The built-in CLI server is for development only.
Apache Setup
To setup apache, setup a virtual host to point to the public/ directory of the project and you should be ready to go! It should look something like below:
<VirtualHost *:80>
ServerName zf2-tutorial.localhost
DocumentRoot /path/to/zf2-app/public
SetEnv APPLICATION_ENV "development"
<Directory /path/to/zf2-app/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>