Folders of the Starter App
The Starter App source code is located into the INSTALL_DIR/applications/default
folder
The typical folder tree of the Starter App is shown below:
INSTALL_DIR/applications/
default/
app/
Here are installed the private PHP scripts.
controller/
lang/
model/
validator/
view/
documents/
public/
Here are installed the public resources.
css/
images/
js/
The PHP classes of the Starter App must be declared with a namespace prefixed by app
.
Here are some examples of namespace according to the folder where the PHP script is located:
myappctrl.php
script (controller)
<?php
namespace app\controller;
class MyAppCtrl extends \AppController {
static protected function action_get() {
/* Code of the controller's action */
}
}
mydao.php
script (model)
<?php
namespace app\model;
class MyDao extends \DAO {
protected function initDaoProperties() {
/* Code of the DAO */
}
}
myvalidator.php
script (validator)
<?php
namespace app\validator;
class MyValidator extends \Validator
{
protected function initVariables() {
return array('my_first_value', 'my_second_value');
}
protected function check_my_first_value($value) {
/* Code for validating data */
}
protected function check_my_second_value($value) {
/* Code for validating data */
}
}
myclass.php
script
<?php
namespace app;
class MyClass
{
/* Code of the class */
}