Ahoy matey! First ye be needin' Composer! Then install Bone.
composer create-project delboy1978uk/boneframework your/path/here
or if ye haven't installed composer globally ...
php composer.phar create-project delboy1978uk/boneframework your/path/here
Bone comes wit' a docker-compose.yml in th' project, so ye can instantly get a dev server runnin' if ye use Docker (Tested usin' a default VirtualBox VM). Jus' add this t' yer hosts file
awesome.scot 192.168.99.100
Then ye can access th' site at https://awesome.scot in yer browser. O' course if ye don't use docker ye can add it t' yer LAMP stack in th' usual way.
Ye can see ye have a config, data, public, and src folder. Dinnae be touchin' th' vendor folder or th' Cap'n will make ye walk the plank!
Make th' data folder writable. 777 be lettin' every landlubber have write access, so if ye can we prefer 775 with yer Apache user in th' group.
chmod -R 775 data
In yer apache virtual hosts, set the document root as th' public folder
Ye can drop in any number o' .php files into th' config/ folder. Make sure they return an array wit' th' config . Ye can o'erride configuration based on environment var APPLICATION_ENV, so fer instance if th' environment was productionit would load th' additional config th' production subdirectory.
Thar are several config files by default:
In yer config files, ye can add anythin' ye wants. It gets stored in th' Bone\Mvc\Registry.
Set yer default db credentials in th' main config/db.php, 'n any environment specific configs in a subdirectory
Bone supports translation into different locales. Translation files (gettext .po 'n .mo) best be placed in data/translations, under a subdirectory o' th' locale, eg data/translations/en_GB/en_GB.po. Ye can set th' default locale 'n an array o' supported locales.
T' use th' translator, ye can simply call:To use the translator, you can simply call:
Bone uses monolog/monolog, 'n logs can be found in data/logs. Currently we only support writin' t' files, but ye can add as many channels as ye like:
T' use th' logger in a controller:
Bone uses Zend Mail. T' configure th' mail client, jus' drop in yer config (see zend mail docs)
If ye be usin' th' Docker Box provided by bone, ye also 'ave th' awesome MailHog at yer disposal. Browse t' awesome.scot:8025 'n ye'll see a catch all email inbox, so ye ne'er needs t' worry about development emails reachin' th' real world.
Routes follow a default pattern o' /controller/action/param/value/nextparam/nextvalue/etc/etc
Ye can also o'erride routes by definin' them in th' config array:
When definin' routes, mandatory variables in th' uri 'ave a colon like :id
Optional uri vars 'ave [ ] surroundin' them like [:id]
Ignore this config. 'tis ole deprecated nonsense.