2015-03-15 18:13:25 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Conference extends ModelBase
|
|
|
|
{
|
|
|
|
public function getTitle() {
|
|
|
|
return $this->get('CONFERENCE.TITLE', 'C3Voc Streaming');
|
|
|
|
}
|
|
|
|
|
2015-04-04 18:11:25 +00:00
|
|
|
public function isClosed() {
|
2015-09-02 10:56:32 +00:00
|
|
|
return !$this->hasBegun() || $this->hasEnded();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function hasBegun() {
|
|
|
|
if($this->has('CONFERENCE.CLOSED')) {
|
|
|
|
$closed = $this->get('CONFERENCE.CLOSED');
|
|
|
|
|
|
|
|
/* when CLOSED is a boolean, we're reading an old config where
|
|
|
|
* conferences didn't have a pre-beginning phase, thus we always
|
|
|
|
* return true.
|
|
|
|
*/
|
|
|
|
if(gettype($closed) == "boolean")
|
|
|
|
return true;
|
|
|
|
|
|
|
|
if($closed == "before")
|
|
|
|
return false;
|
2015-09-02 14:54:42 +00:00
|
|
|
else if($closed == "running" || $closed == "after")
|
2015-09-02 10:56:32 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-09-09 01:40:40 +00:00
|
|
|
if($this->has('CONFERENCE.STARTS_AT')) {
|
|
|
|
return time() >= $this->get('CONFERENCE.STARTS_AT');
|
|
|
|
} else {
|
|
|
|
return true;
|
|
|
|
}
|
2015-09-02 10:56:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function hasEnded() {
|
|
|
|
if($this->has('CONFERENCE.CLOSED')) {
|
|
|
|
$closed = $this->get('CONFERENCE.CLOSED');
|
|
|
|
|
|
|
|
if($closed == "after" || $closed === true)
|
|
|
|
return true;
|
2015-09-02 14:54:42 +00:00
|
|
|
else if($closed == "running" || $closed == "before" ||
|
|
|
|
$closed === false)
|
2015-09-02 10:56:32 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2015-09-09 01:40:40 +00:00
|
|
|
if($this->has('CONFERENCE.ENDS_AT')) {
|
|
|
|
return time() >= $this->get('CONFERENCE.ENDS_AT');
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
2015-04-04 18:11:25 +00:00
|
|
|
}
|
|
|
|
|
2015-03-15 18:13:25 +00:00
|
|
|
public function hasAuthor() {
|
|
|
|
return $this->has('CONFERENCE.AUTHOR');
|
|
|
|
}
|
|
|
|
public function getAuthor() {
|
|
|
|
return $this->get('CONFERENCE.AUTHOR', '');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function hasDescription() {
|
|
|
|
return $this->has('CONFERENCE.DESCRIPTION');
|
|
|
|
}
|
|
|
|
public function getDescription() {
|
|
|
|
return $this->get('CONFERENCE.DESCRIPTION', '');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function hasKeywords() {
|
|
|
|
return $this->has('CONFERENCE.KEYWORDS');
|
|
|
|
}
|
|
|
|
public function getKeywords() {
|
|
|
|
return $this->get('CONFERENCE.KEYWORDS', '');
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function hasReleases() {
|
|
|
|
return $this->has('CONFERENCE.RELEASES');
|
|
|
|
}
|
|
|
|
public function getReleasesUrl() {
|
|
|
|
return $this->get('CONFERENCE.RELEASES');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function hasRelive() {
|
2015-08-29 13:31:56 +00:00
|
|
|
return $this->has('CONFERENCE.RELIVE_JSON');
|
2015-03-15 18:13:25 +00:00
|
|
|
}
|
|
|
|
public function getReliveUrl() {
|
2015-08-29 13:31:56 +00:00
|
|
|
if($this->has('CONFERENCE.RELIVE_JSON'))
|
2015-03-15 18:13:25 +00:00
|
|
|
return 'relive/';
|
|
|
|
|
|
|
|
else
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function hasBannerHtml() {
|
|
|
|
return $this->has('CONFERENCE.BANNER_HTML');
|
|
|
|
}
|
|
|
|
public function getBannerHtml() {
|
|
|
|
return $this->get('CONFERENCE.BANNER_HTML');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function hasFooterHtml() {
|
|
|
|
return $this->has('CONFERENCE.FOOTER_HTML');
|
|
|
|
}
|
|
|
|
public function getFooterHtml() {
|
|
|
|
return $this->get('CONFERENCE.FOOTER_HTML');
|
|
|
|
}
|
|
|
|
}
|