%PDF- %PDF-
| Direktori : /www/varak.net/video.varak.net/app/engine/ |
| Current File : /www/varak.net/video.varak.net/app/engine/Resources.php |
<?php
/**
* Created by PhpStorm.
* User: Turbo
* Date: 15.12.2015
* Time: 17:25
*/
namespace Engine;
use Utils\Strings;
class Resources
{
const JQUERY_JS = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js";
const BOOTSTRAP_CSS = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css";
const BOOTSTRAP_JS = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js";
const JWPLAYER_JS = "https://content.jwplatform.com/libraries/ZtlZ4mIE.js";
const PLAYER_JS = "resources/player.js";
const PLAYER_CSS = "resources/player.css";
const INDEX_CSS = "resources/index.css";
const ELASTISLIDE_MODERNIZR_JS = "vendor/elastislide/js/modernizr.custom.17475.js";
const ELASTISLIDE_JS = "vendor/elastislide/js/jquery.elastislide.js";
const ELASTISLIDE_PP_CUSTOM_JS = "vendor/elastislide/js/jquerypp.custom.js";
const ELASTISLIDE_CSS = "vendor/elastislide/css/elastislide.css";
const ELASTISLIDE_CUSTOM_CSS = "vendor/elastislide/css/custom.css";
public function renderResources()
{
$class = new \ReflectionClass(__CLASS__);
$resources = $class->getConstants();
foreach ($resources as $key => $resource)
{
if (Strings::endsWith($key, 'CSS'))
{
$this->renderStyle($resource);
} elseif (Strings::endsWith($key, 'JS')) {
$this->renderJS($resource);
}
}
}
public function renderJS($resource)
{
echo "<script src=\"".$resource."\"></script>\n";
}
public function renderStyle($resource)
{
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$resource."\">\n";
}
}