hoaproject/Core — pull request #32 by 1e1 (2014-05-21 15:32:15+00:00)
Title: prevent auto-initializing if HOA_CREATOR is already defined

Use case:
`./Application/Public/index.php`
```php

define('__ROOT__', dirname(__DIR__));
define('HOA_CREATOR', __FILE__);
define('HOA_PATH', dirname(__ROOT__) . DIRECTORY_SEPARATOR . 'Hoa.central');
define('LIB_PATH', dirname(__ROOT__) . DIRECTORY_SEPARATOR . 'Libraries.hoa');

/*PRD~•/ error_reporting(NONE); /•~PRD*/
/*DEV~*/ error_reporting(E_ALL); /*~DEV*/
set_include_path(null);

require HOA_PATH.DIRECTORY_SEPARATOR.'Hoa'.DIRECTORY_SEPARATOR.'Core'.DIRECTORY_SEPARATOR.'Core.php';

$hoa = Hoa\Core\Core::getInstance()->initialize([
'root.application' => __ROOT__,
'root.data' => __ROOT__ . DS . 'Data',
]);

event('hoa://Event/Exception')->attach(new Hoa\File\Write('hoa://Data/Variable/Log/Exception.log'));

/* ================================================ */

from('Hoa')
-> import('Database.Dal')
-> import('Router.Http')
-> import('Dispatcher.Basic')
-> import('Xyl~')
-> import('Xyl.Interpreter.Html~')
-> import('File.Read')
-> import('Http.Response~')
;

...
```
And `HOA_CREATOR` may be used for debugging.