예제 #1
0
파일: Asset.php 프로젝트: undercloud/ant
 /**
  * Register plugin
  *
  * @param Ant\Ant $ant instance
  *
  * @return void
  */
 public function register(Ant $ant)
 {
     $asset = new self();
     $ant->register('asset', function ($path) use($asset) {
         return $asset->check($path);
     });
 }
예제 #2
0
파일: Leaf.php 프로젝트: undercloud/ant
 /**
  * Register plugin
  *
  * @param Ant\Ant $ant instance
  *
  * @return void
  */
 public function register(Ant $ant)
 {
     $thisis = $this;
     $ant->register('leaf', function (array $options = array()) use($thisis) {
         return \Undercloud\Leaf::init($options ? $options : $thisis->options);
     });
 }
예제 #3
0
파일: YouTube.php 프로젝트: undercloud/ant
 /**
  * Register plugin
  *
  * @param Ant\Ant $ant instance
  *
  * @return void
  */
 public function register(Ant $ant)
 {
     $params = isset($this->options['params']) ? $this->options['params'] : array();
     $attrs = isset($this->options['attrs']) ? $this->options['attrs'] : array();
     self::setup($params, $attrs);
     $ant->register('youtube', new self());
 }
예제 #4
0
 /**
  * Register plugin
  *
  * @param Ant\Ant $ant instance
  *
  * @return void
  */
 public function register(Ant $ant)
 {
     $ant->register('ga', function ($code, $domain = '') {
         $ga = new self();
         return $ga->embed($code, $domain);
     });
 }
예제 #5
0
 /**
  * Register plugin
  *
  * @param Ant\Ant $ant instance
  *
  * @return void
  */
 public function register(Ant $ant)
 {
     $ant->register('css', function ($storage) {
         return new \Undercloud\InlineCSS($storage);
     });
 }
예제 #6
0
파일: Faker.php 프로젝트: undercloud/ant
 /**
  * Register plugin
  *
  * @param Ant\Ant $ant instance
  *
  * @return void
  */
 public function register(Ant $ant)
 {
     $ant->register('faker', \Faker\Factory::create($this->locale));
 }
예제 #7
0
파일: Lang.php 프로젝트: undercloud/ant
 public function register(Ant $ant)
 {
     $ant->register('lang', new \Undercloud\Lang($this->options));
 }