Parable Framework#Using the Parable Framework with the default structure is pretty straightforward. To install the default structure, if you haven't yet, follow the instructions in Installation. The default structure offers a skeleton setup with all elements in place as an example. Introduction#Parable has a number of files/classes it'll look for and load if they are present. The most important of these will be Flow of Parable#
If matched, the Dispatcher takes over at this point, and it will handle the Route as it's configured. Parable's default
|
Parameter | Type | Info |
---|---|---|
parable.app.homedir | string | Where the publicly accessible files and index.php can be found. |
parable.commands | array | A list of commands to load. |
parable.configs | array | A list of additional configs to load. |
parable.database.type | string | \Parable\ORM\Database::TYPE_MYSQL or TYPE_SQLITE |
parable.database.location | string | For TYPE_SQLITE the location of the database file. For TYPE_MYSQL the host. |
parable.database.username | string | Only for TYPE_MYSQL . |
parable.database.password | string | Only for TYPE_MYSQL . |
parable.database.database | string | Only for TYPE_MYSQL . |
parable.database.soft-quoting | bool | Whether to allow soft quoting or force the need for a Database instance. |
parable.debug | bool | Enable displaying errors, default false . |
parable.inits | array | A list of inits to load. |
parable.mail.sender | string | The mail sender class to be used. |
parable.mail.from.email | string | The email address to send mail as. |
parable.mail.from.name | string | The name to send mail as. |
parable.routes | array | A list of routes files to load. |
parable.session.auto-enable | string | Enable sessions by default or not. Default true . |
parable.timezone | string | A timezone string in the form of Europe/Amsterdam will be set as default. |
To get a config value from the Config class, call $config->get("parable.app");
. The dot-notation (so parable.app.title
) is a shorthand for getting to nested values. So when this documentation says parable.app.title
, that's what we're referring to.
None of the values in the default structure's Config are required. They're handy, but they're not required. Instead of setting the Database config in here, you could simply create a new instance yourself and setting the config on that instead.
What's most useful is the additional configs, commands, inits and routes.
Edit on GitHub