<?php //Change the include path to point to your application directory ini_set('include_path', '../application:' . ini_get('include_path')); //Change the include path of fango if you need require_once '../../../fango.php'; require_once 'controllers/default.php'; //Just to show how plugins work require_once 'plugins/stupid.php'; new StupidPlugin(); FangoDB::connect('mysql:dbname=fango;host=127.0.0.1', 'root'); $fango = new Fango(); //I'd like to have just a Controller for this application so a specify //a custom rule using a regular expresssion //By default the rules are /controller/actionname/par1/value1/par2/value2... //The controller has to have a method named {actionname}Action, eg. indexAction $fango->run('(\\w+)/?(.*)$ controller=default,action=$1,params=$2');
/** * The arg row is new? * @param array $row to consider * @param mixed $pk * @return boolean */ function isNew($row, $pk = null) { list($pk_where, $pk_values) = $this->pkParts($row, $pk); $statement = "SELECT 1 FROM {$this->name} WHERE {$pk_where}"; return !$this->db->getOne($statement, $pk_values); }