forked from zendframework/zendframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'livedocx-2.0' of https://github.com/jonathanmaron/zf2 i…
…nto feature/livedocx-demo-improvements
- Loading branch information
Showing
3 changed files
with
129 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
<?php | ||
|
||
// Set used namespaces | ||
use Zend\Locale\Locale; | ||
use Zend\Registry; | ||
use Zend\Service\LiveDocx\Helper; | ||
use \Zend\Loader\StandardAutoloader; | ||
use \Zend\Locale\Locale; | ||
use \Zend\Service\LiveDocx\Helper; | ||
|
||
// Turn up error reporting | ||
error_reporting(E_ALL | E_STRICT); | ||
|
||
// Set up autoloader | ||
// Library base | ||
$base = dirname(dirname(dirname(dirname(__DIR__)))); | ||
|
||
// Set up autoloader | ||
require_once "{$base}/library/Zend/Loader/StandardAutoloader.php"; | ||
$loader = new \Zend\Loader\StandardAutoloader(); | ||
$loader = new StandardAutoloader(); | ||
$loader->registerNamespace('Zend', "{$base}/library/Zend"); | ||
$loader->register(); | ||
|
||
// Include utility class | ||
require_once "{$base}/demos/Zend/Service/LiveDocx/library/Zend/Service/LiveDocx/Helper.php"; | ||
|
||
// Set default locale | ||
Locale::setDefault(Helper::LOCALE); | ||
$locale = new Locale(Locale::ZFDEFAULT); | ||
Registry::set('Zend_Locale', $locale); | ||
// Set fallback locale | ||
Locale::setFallback(Helper::LOCALE); | ||
|
||
// Ensure LiveDocx credentials are available | ||
if (false === Helper::credentialsAvailable()) { | ||
Helper::printLine(Helper::credentialsHowTo()); | ||
exit(); | ||
} | ||
|
||
unset($base); | ||
unset($base); |
Oops, something went wrong.