This class is used to declare public functions

package OWR
subpackage Interfaces

 Methods

Counts row(s) from the database

count(mixed $args, string $select, string $groupby, string $selectAdd) : mixed
access public
author Pierre-Alain Mignot

Parameters

$args

mixed

parameters, can be null, a string (if an $_idField has been declared), or an array

$select

string

select fields, by default all

$groupby

string

the groupby clause

$selectAdd

string

additional fields to fetch, optionnal

Returns

mixednull if any, an object of the current DAO name if only one DBResult, or an array if more

Deletes row(s) from the database

delete(mixed $args, string $limit) : boolean
access public
author Pierre-Alain Mignot

Parameters

$args

mixed

parameters, can be null (deletes himself if $_idField declared), a string (if an $_idField has been declared), or an array

$limit

string

the limit clause

Returns

booleantrue on success

Gets rows from the database

get(mixed $args, string $select, string $order, string $groupby, string $limit) : mixed
access public
author Pierre-Alain Mignot

Parameters

$args

mixed

parameters, can be a string (if an $_idField has been declared), or an array

$select

string

select fields, by default all

$order

string

the order clause

$groupby

string

the groupby clause

$limit

string

the limit clause

Returns

mixednull if any, an object of the current DAO name if only one DBResult, or an array if more

Returns the specified DAO object This function accepts an ID and will return the DAO for the corresponding type

getById(int $id) : mixed
Static
access public
static
author Pierre-Alain Mignot

Parameters

$id

int

the id of the object

Returns

mixedthe DAO object if found, else false

Returns the specified DAO object from cache

getCachedDAO(string $dao) : mixed
Static
access public
static
author Pierre-Alain Mignot

Parameters

$dao

string

the name of the DAO

Returns

mixedthe DAO object

Returns the specified DAO object

getDAO(string $dao) : mixed
Static
access public
static
author Pierre-Alain Mignot

Parameters

$dao

string

the name of the DAO

Returns

mixedthe DAO object

Returns the fields

getFields() : array
access public
author Pierre-Alain Mignot

Returns

arraythe fields for this object

Returns the id field

getIdField() : string
access public
author Pierre-Alain Mignot

Returns

stringthe id field for this object

Returns the type relative to the specified id This method also checks for user rights to read it

getType(int $id) : mixed
Static
author Pierre-Alain Mignot
access public
static

Parameters

$id

int

the id to get type from

Returns

mixedfalse on error, or the type corresponding to the id

Returns the unique fields

getUniqueFields() : array
access public
author Pierre-Alain Mignot

Returns

arraythe unique fields for this object

Populates values into this object

populate(mixed $obj) : boolean
access public
author Pierre-Alain Mignot

Parameters

$obj

mixed

the values to populate

Returns

booleantrue on success

Saves a row into the database

save(boolean $ignore) : mixed
access public
author Pierre-Alain Mignot

Parameters

$ignore

boolean

if we must save with a INSERT IGNORE clause instead of REPLACE INTO if no $_idField has been declared

Returns

mixedif success true if no $_idField declared or the value of the $_idField