コード例 #1
0
ファイル: Haml.php プロジェクト: undercloud/ant
 /**
  * Register plugin
  *
  * @param Ant\Ant $ant instance
  *
  * @return void
  */
 public function register(Ant $ant)
 {
     $this->event = $ant->bind('build', function ($content) {
         $haml = new HamlPHP();
         return $haml->parseString($content);
     });
 }
コード例 #2
0
ファイル: Markdown.php プロジェクト: undercloud/ant
 /**
  * Register plugin
  *
  * @param Ant\Ant $ant instance
  *
  * @return void
  */
 public function register(Ant $ant)
 {
     $this->event = $ant->bind('build', function ($content) {
         $md = new Parsedown();
         return $md->text($content);
     });
 }
コード例 #3
0
ファイル: Jade.php プロジェクト: undercloud/ant
 /**
  * Register plugin
  *
  * @param Ant\Ant $ant instance
  *
  * @return void
  */
 public function register(Ant $ant)
 {
     $callback = function ($content) {
         $jade = new PicoJade();
         return $jade->compile($content);
     };
     $this->event = $ant->bind('build', $callback);
 }
コード例 #4
0
ファイル: Compressor.php プロジェクト: undercloud/ant
 /**
  * Register plugin
  *
  * @param Ant\Ant $ant instance
  *
  * @return void
  */
 public function register(Ant $ant)
 {
     $this->event = $ant->bind('build', array($this, 'compress'));
 }
コード例 #5
0
ファイル: Validator.php プロジェクト: undercloud/ant
 /**
  * Register plugin
  *
  * @param Ant\Ant $ant instance
  *
  * @return void
  */
 public function register(Ant $ant)
 {
     $this->event = $ant->bind('exec', array($this, 'validate'));
 }