setResourceURI($resourceURI);
$this->createCSS();
$this->createJS();
}
protected function createCSS(){}
protected function createJS(){}
public function setResourceURI(string $resourceURI): void
{
$this->resourceURI = $resourceURI;
}
public function registerJS(string $slug, string $resource, bool $body = true, bool $addResourceURI = true): void
{
$resource = $addResourceURI ? $this->resourceURI . $resource : $resource;
if ($body) {
$this->jsBody[$slug] = $resource;
} else {
$this->jsHeader[$slug] = $resource;
}
}
public function registerCSS(string $slug, string $resource, bool $addResourceURI = true): void
{
$resource = $addResourceURI ? $this->resourceURI . $resource : $resource;
$this->css[$slug] = $resource;
}
public function getJSAsStr(bool $body = true): void
{
if ($body) {
foreach ($this->jsBody as $key => $item){
echo "";
}
}
else {
foreach ($this->jsHeader as $key => $item){
echo "";
}
}
}
public function getCSSAsSTR(): void
{
foreach ($this->css as $key => $item){
echo "";
}
}
}