예제 #1
0
 /**
  * Register the service provider.
  *
  * @return LexiconInterface
  */
 public function register()
 {
     if (!static::$testing) {
         $this->package('anomaly/lexicon');
     }
     $lexicon = new Lexicon($this->app);
     $lexicon->register();
     return $lexicon;
 }
예제 #2
0
 /**
  * @return LexiconInterface
  */
 public static function get()
 {
     $lexicon = new Lexicon();
     $lexicon->addNamespace('test', __DIR__ . '/../resources/views')->setStoragePath(__DIR__ . '/../resources/compiled')->addStringTemplate('<h1>Hello {{ name }}</h1>')->registerPlugin('stub', 'Anomaly\\Lexicon\\Plugin\\StubPlugin')->registerNodeGroup(['Anomaly\\Lexicon\\Node\\NodeType\\Block', 'Anomaly\\Lexicon\\Test\\Stub\\Node\\Undefined'], 'testing')->setDebug(true)->register();
     return $lexicon;
 }