* * For the full copyright and license information, please view the LICENSE file */ namespace Filegator\Services\View\Adapters; use Filegator\Config\Config; use Filegator\Services\Service; use Filegator\Services\View\ViewInterface; class Vuejs implements Service, ViewInterface { private $config; private $add_to_head = ''; private $add_to_body = ''; public function __construct(Config $config) { $this->config = $config; } public function init(array $config = []) { $this->add_to_head = isset($config['add_to_head']) ? $config['add_to_head'] : ''; $this->add_to_body = isset($config['add_to_body']) ? $config['add_to_body'] : ''; } public function getIndexPage() { $title = APP_ENV == 'development' ? 'Development mode' : $this->config->get('frontend_config.app_name'); $public_path = $this->config->get('public_path'); $public_dir = $this->config->get('public_dir'); return ' '.$title.' '.$this->add_to_head.'
'.$this->add_to_body.' '; } }