PHP Class Newscoop\Entity\Repository\ArticleDatetimeRepository

Inheritance: extends Doctrine\ORM\EntityRepository
Exibir arquivo Open project: sourcefabric/newscoop

Protected Properties

Property Type Description
$lastQParams
$lastQb

Public Methods

Method Description
add ( array | ArticleDatetime $timeSet, integer | Article $articleId, string $fieldName = null, string $recurring = null, boolean $overwrite = false, $otherInfo = null ) Adds time intervals
deleteByArticle ( $article )
deleteById ( $id )
deleteField ( $p_articleType, $p_fieldNames )
findDates ( object $search, $dontExecute = false ) Find dates
getEmpty ( )
getFindDatesSQL ( array | string $cols = null ) Get the sql used for find method
renameField ( $p_articleType, $p_fieldNames )
update ( integer $id, array $timeSet, integer $articleId = null, string $fieldName = null, string $recurring = null, $otherInfo = null ) Update entry by id

Private Methods

Method Description
buildInsertValues ( $timeSet, $recurring ) : array

Method Details

add() public method

Adds time intervals
public add ( array | ArticleDatetime $timeSet, integer | Article $articleId, string $fieldName = null, string $recurring = null, boolean $overwrite = false, $otherInfo = null )
$timeSet array | Newscoop\Entity\ArticleDatetime Complex set of intervals { "2011-11-02" = { "12:00" => "18:00", "20:00" => "22:00", [ "recurring" => true|false ] } - between these hours on 11-02 "2011-11-03" = "11:00 - recurring:weekly" - at 11:00 this day, and recurring weekly "2011-11-03 14:00" = "18:00" - from 3rd nov 14:00 until 18:00 "2011-11-04" = "2011-11-07" - from 4th till 7th nov "2011-11-08" = "2011-11-09 12:00" - from 8th till 12:00 9th "2011-11-10 10:30" = "2011-11-11" - from 10th 10:40 until the end of the day "2011-11-12 12:30" = "2011-11-13 13:00" - self explanatory "2011-11-14 14:30" = "2011-11-15 15:00" - self explanatory "2011-11-15 15:30" = "2011-11-17" - self explanatory "2011-11-30" = true - on the 30th full day }
$articleId integer | Newscoop\Entity\Article
$fieldName string
$recurring string
$overwrite boolean

deleteByArticle() public method

public deleteByArticle ( $article )

deleteById() public method

public deleteById ( $id )

deleteField() public method

public deleteField ( $p_articleType, $p_fieldNames )

findDates() public method

Find dates
public findDates ( object $search, $dontExecute = false )
$search object { startDate : dateFormat, - passing only startDate will compare to entries with exactly (=) this value endDate : dateFormat, startTime : dateFormat, endTime : dateFormat, daily : bool|dateFormat, weekly : dateFormat, monthly : dateFormat, yearly : dateFormat }
$dontExecute if true, store query builder object and params in $this->lastQb and $this->lastQParams for later use

getEmpty() public method

public getEmpty ( )

getFindDatesSQL() public method

Get the sql used for find method
public getFindDatesSQL ( array | string $cols = null )
$cols array | string columns to select

renameField() public method

public renameField ( $p_articleType, $p_fieldNames )

update() public method

Update entry by id
public update ( integer $id, array $timeSet, integer $articleId = null, string $fieldName = null, string $recurring = null, $otherInfo = null )
$id integer
$timeSet array
$articleId integer
$fieldName string
$recurring string

Property Details

$lastQParams protected_oe property

protected $lastQParams

$lastQb protected_oe property

protected $lastQb