This class is used as base class for all DAO objects and defines all usefull functions Please ensure that all the non-static public functions returns $this

abstract
uses implements the Model interface
uses the database link
uses a request sent to the database
uses a DB\Result from the database
uses the exceptions handler
uses the user
package OWR
used_by \OWR\Model\Objects
used_by \OWR\Model\Users
used_by \OWR\Model\News
used_by \OWR\Model\News\Tags
used_by \OWR\Model\Streams
used_by \OWR\Model\Streams\Groups
used_by \OWR\REST\Controller

 Methods

Deletes object(s)

delete(\OWR\Request $request) : \OWR\Model
Inherited
access public
author Pierre-Alain Mignot
inherited_from \OWR\Interfaces\Model::delete()
fluent This method is part of a fluent interface and will return the same instance

Parameters

$request

\OWR\Interfaces\OWR\Request

the Request instance

Returns

Adds/Edits an object

edit(\OWR\Request $request) : \OWR\Model
Inherited
access public
author Pierre-Alain Mignot
inherited_from \OWR\Interfaces\Model::edit()
fluent This method is part of a fluent interface and will return the same instance

Parameters

$request

\OWR\Interfaces\OWR\Request

the Request instance

Returns

Returns the specified Model object from cache

getCachedModel(string $model) : mixed
Static
access public
static
author Pierre-Alain Mignot

Parameters

$model

string

the name of the Model

Returns

mixedthe Model object

Returns the specified Model object

getModel(string $model) : mixed
Static
access public
static
author Pierre-Alain Mignot

Parameters

$model

string

the name of the Model

Returns

mixedthe Model object

Gets datas to render object(s)

view(\OWR\Request $request, array $args, string $order, string $groupby, string $limit) : \OWR\Model
Inherited
access public
author Pierre-Alain Mignot
inherited_from \OWR\Interfaces\Model::view()
fluent This method is part of a fluent interface and will return the same instance

Parameters

$request

\OWR\Interfaces\OWR\Request

the Request instance

$args

array

additional arguments, optionnal

$order

string

the order clause

$groupby

string

the groupby clause

$limit

string

the limit clause

Returns

Constructor, sets the name/fullname of the instance, and set the DB obj

__construct() 
access public
author Pierre-Alain Mignot

Sets the user's timestamp, which corresponds to the last http request timestamp for this user

_setUserTimestamp(array $datas) 
author Pierre-Alain Mignot
access public

Parameters

$datas

array

the datas retrieved from DB

 Properties

 

the DAO instance for the current class

$_dao : mixed
access protected
 

the DB instance

$_db : mixed
access protected
 

the class name

$_fullName : string
access protected
 

the table name

$_name : string
access protected
 

stored already processed models objects

$_cachedModels : array
access private
static
 

stored already processed model names

$_models : array
access private
static