https://github.com/PressForward/pressforward
Tip revision: f87eb54ee570903418f2fa498f2d5240363ccc5b authored by Aram Zucker-Scharff on 12 October 2016, 18:21:46 UTC
Update pressforward.php
Update pressforward.php
Tip revision: f87eb54
init.php
<?php
//Out-of-namespace dependencies
require 'class-SplClassLoader.php';
require 'Libraries/PFSimpleHtmlDom.php';
require 'Libraries/URLResolver/URLResolver.php';
require 'Libraries/FiveFiltersReadability/Readability.php';
require 'Libraries/AlertBox/The_Alert_Box.php';
require 'includes/opml/object.php';
require 'includes/opml/reader.php';
require 'includes/opml/maker.php';
require 'Libraries/PFOpenGraph.php';
//Files included to maintain back-compat
require 'includes/functions.php';
require 'includes/relationships.php';
require 'includes/template-tags.php';
use SplClassLoader as ClassLoader;
$classLoader = new ClassLoader('PressForward', dirname(__FILE__), false);
//var_dump($classLoader->getIncludePath());
$classLoader->filterFinalPath("PressForward".DIRECTORY_SEPARATOR, '');
$classLoader->register();
//use PressForward\Loader;
function pressforward($prop = false) {
$instance = new stdClass();
try {
$instance = new PressForward\Application(__FILE__);
$instance->boot();
//var_dump('New Boot');
} catch (Intraxia\Jaxion\Core\ApplicationAlreadyBootedException $e) {
//var_dump('Old boot.');
$instance = PressForward\Application::instance();
}
if (!$prop){
return $instance;
} else {
return $instance[$prop];
}
}
pressforward();