예제 #1
0
 public static function init()
 {
     global $infra, $infrajs;
     Event::handler('oninit', function () {
         //session и template
         global $infra_template_scope;
         $fn = function ($name, $value) {
             return unick::find($name, $value);
         };
         Sequence::set($infra_template_scope, Sequence::right('infrajs.find'), $fn);
         Sequence::set($infra_template_scope, Sequence::right('infrajs.unicks'), unick::$unicks);
     });
 }
예제 #2
0
<?php

namespace infrajs\controller;

use infrajs\path\Path;
use infrajs\event\Event;
Event::handler('oninit', function () {
    ext\unick::init();
});
Event::handler('layer.oninit:external', function (&$layer) {
    ext\unick::check($layer);
}, 'unick');