This class is an implementation of the active record pattern and has been created in order to simplify
the access to the table "Number".
Each Number has many Article(s).
Accessible methods:
public function getId():
return the id of the Number instance.
public static function findById($id):
return a Number querying the database.
public static function findInAllTextFields($string):
return an array containing all Number(s) having at
least a field matching the String $string.
public function findUpIndexNumber():
return the Number with the field indexnumber coming
immediately after the courrent Number instance.
public function findDownIndexNumber():
return the Number with the field indexnumber previously
the courrent Number instance.
public static function findByTitle($title):
return an array of Number(s) containing a Title matching
the string $title.
public static function findLast():
return the last Number inserted in the database.
public static function findLastPublished():
return the last Number inserted in the database having
the flag published setted to true.
public static function findLastNPublished($n):
return an array containing the last $n Number(s)
inserted in the database having the flag published setted to true.
public static function findAll():
return an array containing all Number(s) in the database.
public static function findAllOrderedByIndexNumber():
return an array of Number(s) ordered
by the field IndexNumber in descend order.
public static function findAllPublishedOrderedByIndexNumber():
return an array of Number(s) ordered
by the field IndexNumber in descend order having the flag published setted to true.
The order is useful in order to print the Numbers in the order gived by the publisher in the administration
panel.
public static function findAllNotPublishedOrderedByIndexNumber():
return an array of Number(s) ordered
by the field IndexNumber in descend order having the flag published setted to false.
public function artilclesPublished():
return a list of
Article(s), related the Number instance
having the flag published equal to true.
public function articles():
return a list of
Article(s) related the the Number instance.
public function comments():
return a list of
Comment(s) related the Articles linked to the Number instance.
public function save():
save the courrent instance.
public function delete():
delete from the database the courrent instance and reset all the
instance fields.
protected function insert():
insert a new instance in the database.
protected function update():
update the courrent instance in the corresponding database record.
public function epubExists():
check it there is an epub publication corresponding to the number.
public function epubPath():
return the path of the epub file correspondig to the number.
public function getMaxIndexNumber():
return an Integer value containing the bigger
indexnumber field in the table "Number".
public function getMaxId():
return an Integer value containing the bigger
id field in the table "Number".
public function getTitle():
return a String containing the title of the Number instance
filtered by filter-plugins activated by the administrator.
public function getUnfilteredTitle():
return a String containing the title of the Number instance.
(Useful for adiministration).
public function setTitle($title):
set the Title of the Number instance to the String $title.
public function getPublished():
return 1 if the Number instance has been published by the website administrator.
public function setPublished($published):
set the Published flag of the Number instance to $published.
public function getIndexnumber():
return an Int value, the Indexnumber field allow User to put the
Numbers in the order desired by the publisher.
public function setIndexnumber($indexnumber):
set the indexnumber field in the Number instance.
public function getSubtitle():
return a String containing the title of the Number instance filtered by filters
activated by the user in the administration.
public function getUnfilteredSubtitle():
return the unfiltered content of the field SubTitle of
the Number instance.
public function setSubtitle($subtitle):
set the SubTitle field in the Number instance.
public function getSummary():
return a String containing the summary of the Number instance filtered by filters
activated by the user in the administration.
public function getUnfilteredSummary():
return the unfiltered content of the field Summay of the Number instance.
public function setSummary($summary):
set the summary field in the Number instance.
public function getCommentsallowed():
return the flag commentsAllowed of the Number instance.
public function setCommentsallowed($commentsallowed):
set the commentsAllowed flag in the
Number instance.
public function getMetadescription():
return the String contained in the Metadescription field in
the Number instance.
public function setMetadescription($metadescription):
set the metadescription field in the Number instance.
public function getMetakeyword():
return the String contained in the Metakeyword field in the Number instance.
public function setMetakeyword($metakeyword):
set the metakeyword field in the Number instance.
public function getCreated():
return the content of the field Created in the Number instance.
public function setCreated($created):
set the created field in the Number instance.
public function getUpdated():
return the content of the field Created in the Number instance.