This class is used to add/edit/delete stream and his related tables

package OWR
subpackage Model
uses extends the base class
uses the request
uses the exception handler
uses the DAO
uses the stream reader
uses the stream parser
uses the logs object
uses add/modify crontab
uses Plugins manager

 Methods

Checks for dead streams

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

Clear a stream of all the news

clear(\OWR\Request $request) : boolean
author Pierre-Alain Mignot
access public

Parameters

$request

\OWR\Model\OWR\Request

the Request instance

Returns

booleantrue on success

Deletes a stream

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

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

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

Tries to get streams favicons If you have Imagick extension installed, it will also try to validate the icon

manageFavicons(\OWR\Request $request) : \OWR\Model\Streams
author Pierre-Alain Mignot
access protected
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

Moves a stream into another category

move(\OWR\Request $request) 
author Pierre-Alain Mignot
access protected

Parameters

$request

\OWR\Model\OWR\Request

the Request instance

Tries to refresh stream(s)

refresh(\OWR\Request $request) : \OWR\Model\Streams
author Pierre-Alain Mignot
access protected
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

Tries to refresh stream(s)

refreshAll(\OWR\Request $request) : \OWR\Model\Streams
author Pierre-Alain Mignot
access protected
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

Renames a stream

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

Updates a stream

update(\OWR\Request $request) : boolean
author Pierre-Alain Mignot
access public

Parameters

$request

\OWR\Model\OWR\Request

the Request instance

Returns

booleantrue on success

Gets datas to render a stream

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

Try to get href from a specific <link> tag

_extractHREF(array $requestedParams, string $src) : array
author Pierre-Alain Mignot
access protected

Parameters

$requestedParams

array

the requested parameters

$src

string

the source to search

Returns

arrayfound href

Tries to parse a stream

_parse(string $url, string $src) : mixed
author Pierre-Alain Mignot
access protected

Parameters

$url

string

the url to parse

$src

string

the original source, optionnal

Returns

mixedStreamReader on success, '' if stream has not changed, false on error

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