<?php
/**
* Load PHP Files When Autoloader Doesn't Exist
*
*/
function falcraftLoad(array $libraries, $context = 'global', $refresh = false)
{
foreach ( $libraries as $include ) {
if ( realpath( __DIR__ . str_replace( '/', DIRECTORY_SEPARATOR, $include ) ) === false ) {
throw new \RuntimeException( "falcraftLoad - $context: include $include not found" );
require_once( realpath( __DIR__ . str_replace('/', DIRECTORY_SEPARATOR, $include ) ) );
}
}
}
|