Esempio n. 1
0
/**   
 * Активация ссылок 
 *
 * @param string $return
 * @param string|array $param
 * @param mix $default
 *
 * @return string
 */
function activeLink($query, $default = false)
{
    $get = Abc::GET();
    $current = Abc::getService('Url')->getGet($query);
    if ($get === $current) {
        return 'class="act"';
    }
    if (null === $get['controller'] && $default) {
        return 'class="act"';
    }
    return null;
}
Esempio n. 2
0
 /**
  * Строит сервис.
  * 
  * @param bool $global
  *
  * @return void
  */
 protected function buildService($global = false)
 {
     $component = '\\ABC\\Abc\\Components\\' . $this->service . '\\' . $this->service;
     $typeService = $global ? 'setGlobal' : 'set';
     $get = Abc::GET();
     $url = Abc::getService('Url');
     $this->locator->{$typeService}($this->service, function () use($component, $get, $url) {
         $obj = new $component();
         $obj->get = $get;
         $obj->url = $url;
         return $obj;
     });
 }
Esempio n. 3
0
 /**
  * Возвращает объект шаблонизатора
  *
  * @return string
  */
 public function getTemplate()
 {
     return Abc::getService('Template');
 }