getCode() returns string
This commit is contained in:
parent
40f0c7f76e
commit
e47b6d3400
@ -35,7 +35,7 @@ abstract class Document {
|
|||||||
return new $this->activeView($this);
|
return new $this->activeView($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCode() {
|
function getCode(): string {
|
||||||
|
|
||||||
if ($this->databaseRequired) {
|
if ($this->databaseRequired) {
|
||||||
$sql = $this->user->getSQL();
|
$sql = $this->user->getSQL();
|
||||||
|
@ -68,7 +68,7 @@ abstract class Head extends View {
|
|||||||
$this->addJS(Script::BOOTSTRAP);
|
$this->addJS(Script::BOOTSTRAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCode() {
|
public function getCode(): string {
|
||||||
$header = "<head>";
|
$header = "<head>";
|
||||||
|
|
||||||
foreach($this->metas as $aMeta) {
|
foreach($this->metas as $aMeta) {
|
||||||
|
@ -22,7 +22,7 @@ class Link extends StaticView {
|
|||||||
$this->rel = $rel;
|
$this->rel = $rel;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCode() {
|
function getCode(): string {
|
||||||
$type = (empty($this->type) ? "" : " type=\"$this->type\"");
|
$type = (empty($this->type) ? "" : " type=\"$this->type\"");
|
||||||
return "<link rel=\"$this->rel\" href=\"$this->href\"$type/>";
|
return "<link rel=\"$this->rel\" href=\"$this->href\"$type/>";
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ class Script extends StaticView {
|
|||||||
$this->content = $content;
|
$this->content = $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCode() {
|
function getCode(): string {
|
||||||
$src = (empty($this->src) ? "" : " src=\"$this->src\"");
|
$src = (empty($this->src) ? "" : " src=\"$this->src\"");
|
||||||
return "<script type=\"$this->type\"$src>$this->content</script>";
|
return "<script type=\"$this->type\"$src>$this->content</script>";
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ class Style extends StaticView {
|
|||||||
$this->style = $style;
|
$this->style = $style;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCode() {
|
function getCode(): string {
|
||||||
return "<style>$this->style</style>";
|
return "<style>$this->style</style>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ namespace Objects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getId() { return $this->languageId; }
|
public function getId() { return $this->languageId; }
|
||||||
public function getCode() { return $this->langCode; }
|
public function getCode(): string { return $this->langCode; }
|
||||||
public function getShortCode() { return substr($this->langCode, 0, 2); }
|
public function getShortCode() { return substr($this->langCode, 0, 2); }
|
||||||
public function getName() { return $this->langName; }
|
public function getName() { return $this->langName; }
|
||||||
public function getIconPath() { return "/img/icons/lang/$this->langCode.gif"; }
|
public function getIconPath() { return "/img/icons/lang/$this->langCode.gif"; }
|
||||||
|
Loading…
Reference in New Issue
Block a user