Exemplo n.º 1
0
<?php

date_default_timezone_set('Europe/Paris');
$composer = dirname(__DIR__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'autoload.php';
if (file_exists($composer)) {
    require_once $composer;
} else {
    require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'Core.php';
}
if (isset($_SERVER['HOA_ATOUM_PRASPEL_EXTENSION'])) {
    Hoa\Core::getInstance()->getParameters()->setParameter('namespace.prefix.Atoum', $_SERVER['HOA_ATOUM_PRASPEL_EXTENSION']);
}
Exemplo n.º 2
0
    /**
     * Alias of \Hoa\Core::_define().
     *
     * @param   string  $name     The name of the constant.
     * @param   string  $value    The value of the constant.
     * @param   bool    $case     True set the case-insentisitve.
     * @return  bool
     */
    if (!function_exists('_define')) {
        function _define($name, $value, $case = false)
        {
            return Hoa\Core::_define($name, $value, $case);
        }
    }
    /**
     * Alias of the \Hoa\Core\Event::getEvent() method.
     *
     * @param   string  $eventId    Event ID.
     * @return  \Hoa\Core\Event
     */
    if (!function_exists('event')) {
        function event($eventId)
        {
            return Hoa\Core\Event\Event::getEvent($eventId);
        }
    }
    /**
     * Then, initialize Hoa.
     */
    Hoa\Core::getInstance()->initialize();
}
Exemplo n.º 3
0
 function resolve($path, $exists = true, $unfold = false)
 {
     return Hoa\Core::getInstance()->getProtocol()->resolve($path, $exists, $unfold);
 }