I'd like to make my first large project in php. I use Phalcon PHP and I created project structure using Phalcon Developer Tools. It something like: .
├── app
│ ├── cache
│ ├── config
│ │ ├── config.php
│ │ ├── loader.php
│ │ └── services.php
│ ├── controllers
│ ├── migrations
│ ├── models
│ └── views
├── index.html
└── public
├── css
├── files
├── img
├── index.php
├── js
└── temp
I think i'll need some global function and classes. I'd like to implement for example Laravel's dd function to dumb variables and using this function like
dd($value);
wherever i want. I also want to create some global classes to use theirs static functions. For example:
User::isLogged()
How to implement this in my project? Create directory functions or lib or indcude in app/? Is it a convention? Place global classes in individual folders? How to separate global functions and classes and register those in standard Phalcon loader and do it once for whole project?