Configuration
Jake configuration is done via an INI file located at its front installation dir (components/com_jake within Joomla main directory), and it is named jake.ini. With it you will have the possibility to set up different CakePHP applications that will be available in Joomla through Jake, and which of those applications will be run by default.
The configuration file is composed of sections, each section name defined between brackets. Each section will also hold settings in the form of key-value pairs, separating the key of the value with the equals sign. A default section called settings defines Jake general settings, such as the default application to run. The rest of the sections will be considered as settings for different CakePHP applications.
Let’s see an example configuration file:
default = "my_app"
[my_app]
name = "Example CakePHP application"
path = "../cake/app/webroot"
url = "/cake"
send = "param1=dummy1"
For each application you can define the following parameters (note that all strings must be enclosed between quotes):
- name: a descriptive name used in Jake’s administration page. This parameter is optional.
- path: the path to your CakePHP application’s webroot directory (usually
app/webrootwithin CakePHP root path). You can either specify an absolute path (such as/home/httpdocs/cake/app/webroot) or a relative path, which is relative to joomla’s main directory (for example../cake/app/webroot). This parameter is mandatory. - url: the absolute URL to your CakePHP application. If your cake application is accessible via
http://www.server.com/cakethen this would be/cake. This parameter is mandatory. - send: if you want to send additional parameters to your CakePHP application (that will be accessible through PHP’s
$_REQUESTindexed array) then set them here in the form of a valid query string. For example if you specifyparam1=dummy1then your CakePHP application can use$_REQUEST['param1']to obtain the value of the parameter. Separate each parameter-value pair with the ampersand sign. This parameter isoptional.
You can have several available CakePHP applications defined in the configuration file. Just set up an application identifier (only consisting of letters, numbers, and the underscore sign), without using the identifier settings that is used to define Jake’s settings, and set your application parameters.
The settings section, that holds Jake general settings, consists of the following parameters:
- default: the identifier of the default CakePHP application to run, which settings should be specified in the configuration file. This parameter is mandatory.
Documentation
Navigate
Categories
Can't Miss
- SYPAD Developers CommunityQuality articles, tutorials and projects for developers.
- SYPAD Outsourcing MarketplaceGet your project done, or bid on projects.