The EuroCMS Development Environment
| author | version | date |
|---|---|---|
| Imri Paloja | draft | 06-08-2022 |
I use vagrant as a development environment, with NGINX, PHP and MariaDB installed.
Tools
And its dependencies.
- IDE(PHPStorm)
I use PHPStorm to develop in, but you can use your own editor.
Steps
After the installation of vagrant, all you need to do is run vagrant up. This will deploy an Ubuntu server with all the needed software.
The Vagrantfile will install and configure all the needed web server software, in the virtual machine.
The host name defined in the NGINX configuration file, is local.eurocms.io. You can set up your host info in /etc/hosts.
192.168.56.20 local.eurocms.io
You can modify the variables in the Vagrantfile, to suit your needs.
| hostname | local.eurocms.io |
| IP address | 192.168.56.20 |
| PHP Version | 8.0 |
| Time zone | Europe/Amsterdam |
EuroCMS
To remember when developing for ECMS, is that on runtime the $_SERVER array is properly filtered and put in a constant. So the server variables can be viewed via constants, like so: constant(HTTP_HOST);.
The Engine class has allot of ECMS system constant. Like path of libraries, modules Themes and such. Type in Engine:: in IDEs like PHPStorm will show a list with available constants.
Core
Core development steps.
Libraries
Libraries development steps.
Modules
Modules development steps
ActiveModule can have functions. Or can be used to include php file with necessary functions.
Themes
Themes development steps
Widgets
Widgets development steps