Esempio n. 1
0
	Allows to connect from any origin. (OPTIONAL, by default true)
	By default is true
*/
$allowAnyOrigin = true;
/*
	Allows OPTIONS method (OPTIONAL, by default true)
*/
$enableOptionsRequest = true;
/*
	ALIASES (OPTIONAL)
	
	Define table aliases. An table alias can get diferent GET,POST,PUT and DELETE conditions and can be used in all following operations
	
	ArrestDBConfig::alias($alias,$table);		
*/
ArrestDBConfig::alias("CategoryVisible", "Category");
//This is an example, remove it
/*
	RELATIONS (OPTIONAL)
	
	Create relations for use extends in GET queries. This allow to get objects an related objects.
	
	Examples
	------------
	
	- with objects: Each product has only one category
	ArrestDBConfig::relation("Product","Category",ArrestDBConfig::prepareRelationObject("Category","Category_id"));
	
	- with lists: Each category has a list of products.
	ArrestDBConfig::relation("Category","Products",ArrestDBConfig::prepareRelationList("Product","Category_id"));
	
Esempio n. 2
0
	Allows to connect from any origin. (OPTIONAL, by default true)
	By default is true
*/
$allowAnyOrigin = true;
/*
	Allows OPTIONS method (OPTIONAL, by default true)
*/
$enableOptionsRequest = true;
/*
	ALIASES (OPTIONAL)
	
	Define table aliases. An table alias can get different GET,POST,PUT and DELETE conditions and can be used in all following operations
	
	ArrestDBConfig::alias($alias,$table);		
*/
ArrestDBConfig::alias("activeProjects", "projects");
// [fmh 2015-10-25] for having an list of active projects - todo: create filter for that thing
/*
	RELATIONS (OPTIONAL)
	
	Create relations for use extends in GET queries. This allow to get objects an related objects.
	
	Use:
	
	ArrestDBConfig::relation($table,$name,$config)
	
	- $table: the table name (equal to table name) witch contains relation
	- $name: the variable where relation is loaded
	
	To prepare a config you can use prepareRelationObject and prepareRelationList functions