Exemplo n.º 1
0
$page = new pages();
if (!empty($page)) {
    /**
     *  YAML PARS
     */
    $params = "hi";
    $yay = $page->config();
    $object = (object) $yay;
    //var_dump($object);
    $loginSession = $page->loginSession();
    $sessionConfig = $page->sessionConfig($loginSession);
    // parsed url with html/ added to the front
    $parsUrl = $page->getPageTemplate();
    // gets the html file or txt file if they exist
    $parsHtmlLocationResult = $page->parsHtml($parsUrl);
    $parsTxtLocationResult = $page->parsTxt($parsUrl);
    //$url = $page->pageURL();
}
$arrayobj = new ArrayObject(array('first', 'second', 'third'));
$arrayobj->append($page->config());
$arrayobj->append(array('five', 'six'));
//echo json_encode($arrayobj);
$name = $sessionConfig['name'];
$config = array($parsHtmlLocationResult, $parsTxtLocationResult, $parsUrl);
//var_dump($config);
// calling parsdown
$Parsedown = new Parsedown();
$parsLocation = file_get_contents($parsTxtLocationResult);
$parsText = $Parsedown->text($parsLocation);
// calling twig
$loader = new Twig_Loader_Filesystem('views/');