This class is used to add/edit/delete groups

package OWR
subpackage Model
uses extends the base class
uses the request
uses the exception handler
uses the DAO
uses Plugins manager

 Methods

Checks if a group exists relative to the id If no id is passed it will try to get the root group, and create it if it does not exist

checkGroupById(\OWR\Request $request) : mixed
author Pierre-Alain Mignot
access public

Parameters

$request

int

&$gid the id to look for, optionnal

Returns

mixedthe DAO object for table streams_groups for specified id

Deletes a group and all contained streams

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

Parameters

$request

\OWR\Model\Streams\OWR\Request

the request

Returns

Adds/Edits a stream

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

Parameters

$request

\OWR\Model\Streams\OWR\Request

the Request instance

Returns

Returns the specified Model object from cache

getCachedModel(string $model) : mixed
InheritedStatic
access public
static
author Pierre-Alain Mignot
inherited_from \OWR\Model::getCachedModel()

Parameters

$model

string

the name of the Model

Returns

mixedthe Model object

Returns the specified Model object

getModel(string $model) : mixed
InheritedStatic
access public
static
author Pierre-Alain Mignot
inherited_from \OWR\Model::getModel()

Parameters

$model

string

the name of the Model

Returns

mixedthe Model object

Renames a group

rename(\OWR\Request $request) 
author Pierre-Alain Mignot
access public

Parameters

$request

\OWR\Model\Streams\OWR\Request

the Request instance

Gets datas to render a group

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

Parameters

$request

\OWR\Model\Streams\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() 
Inherited
access public
author Pierre-Alain Mignot
inherited_from \OWR\Model::__construct()

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

_setUserTimestamp(array $datas) 
Inherited
author Pierre-Alain Mignot
access public
inherited_from \OWR\Model::_setUserTimestamp()

Parameters

$datas

array

the datas retrieved from DB

 Properties

 

the DAO instance for the current class

$_dao : mixed
Inherited
access protected
inherited_from \OWR\Model::$$_dao
 

the DB instance

$_db : mixed
Inherited
access protected
inherited_from \OWR\Model::$$_db
 

the class name

$_fullName : string
Inherited
access protected
inherited_from \OWR\Model::$$_fullName
 

the table name

$_name : string
Inherited
access protected
inherited_from \OWR\Model::$$_name
 

stored already processed models objects

$_cachedModels : array
Inherited
access private
static
inherited_from \OWR\Model::$$_cachedModels
 

stored already processed model names

$_models : array
Inherited
access private
static
inherited_from \OWR\Model::$$_models