<?php
namespace Architect\RenderSystem;
use Architect\Core;
class Layout {
private $config;
private $_vars;
private $_layout;
private $_sections;
function __construct($path) {
$this->config = Core::libraryConfig(__CLASS__);
$this->_layout = $path;
$this->_sections = [];
}
}
static function libraryConfig($libName) {
$location = self::configLocation($libName);
$store = 'config';
if (file_exists($location)){
require_once $location;
return (isset($$store))? $$store : FALSE;
}
}
public static function libraryLocation($libName) {
$location = str_replace('\\', '/', $libName);
$libType = explode('/', $location);
if ($libType[0] == 'App') {
return APPS_DIR.'/'.substr($location, 4).'.php';
}
if($libType[0] == 'Architect') {
return LIBS_DIR.'/'.substr($location, 10).'.php';
}
if($libType[0] == 'Standalone') {
return STANDALONE_APP_DIR.'/'.substr($location, 10).'.php';
}
}