This class is used to add/edit/delete news

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

 Methods

Deletes a new

delete(\OWR\Request $request) : \OWR\Model\News
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\OWR\Request

the Request instance

Returns

Adds/Edits a stream

edit(\OWR\Request $request) : \OWR\Model\News
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\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

Insert the relations between user(s) and a new

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

Parameters

$request

\OWR\Model\OWR\Request

the Request instance

Returns

Update new(s) status (read/unread)

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

Parameters

$request

\OWR\Model\OWR\Request

the Request instance

Returns

Gets datas to render a new

view(\OWR\Request $request, array $args, string $order, string $groupby, string $limit) : \OWR\Model\News
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\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