當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tag::setDefaults方法代碼示例

本文整理匯總了PHP中Phalcon\Tag::setDefaults方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tag::setDefaults方法的具體用法?PHP Tag::setDefaults怎麽用?PHP Tag::setDefaults使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Phalcon\Tag的用法示例。


在下文中一共展示了Tag::setDefaults方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: indexAction

 /**
  * The start action, it shows the "search" view
  */
 public function indexAction()
 {
     $searchParams = ['ping.batchId' => 'batchId', 'ping.proxyId' => 'proxyId', 'b.urlId' => 'urlId'];
     Tag::setDefaults(array('urlId' => $this->request->get('urlId'), 'proxyId' => $this->request->get('proxyId'), 'pingId' => $this->request->get('pingId'), 'batchId' => $this->request->get('batchId')));
     $this->view->pings = $this->searchPings($searchParams);
     $this->view->proxies = Proxy::find();
     $this->view->urls = Url::find();
     $this->view->batches = Batch::find();
     #$this->view->disable();
 }
開發者ID:sweetdevel,項目名稱:pingaroo,代碼行數:13,代碼來源:PingController.php

示例2: indexAction

 /**
  * The start action, it shows the "search" view
  */
 public function indexAction()
 {
     $batchId = $this->request->get('batchId');
     $name = $this->request->get('name');
     $httpCode = $this->request->get('httpCode');
     if (!is_numeric($httpCode)) {
         $httpCode = '';
     }
     if (is_numeric($batchId)) {
         $batch = Batch::findFirst($batchId);
         if (!empty($batch)) {
             $batch->name = $name ?: $batch->name;
         }
     } else {
         $batch = new Batch();
     }
     Tag::setDefaults(array('batchId' => $batchId, 'name' => $name, 'httpCode' => $httpCode));
     $this->view->batch = $batch;
     $this->view->batchIds = Batch::find();
     $this->view->pings = $this->searchPings();
     #$this->view->disable();
 }
開發者ID:sweetdevel,項目名稱:pingaroo,代碼行數:25,代碼來源:BatchController.php

示例3: formDefaults

 /**
  * Reconstructing \Phalcon\Tag::setDefaults via method chaining
  *
  * @param array $values
  * @param bool $merge
  *
  * @return mixed
  */
 public function formDefaults($values, $merge = false)
 {
     Tag::setDefaults($values, $merge);
     return $this;
 }
開發者ID:philippgerard,項目名稱:slayer,代碼行數:13,代碼來源:View.php

示例4: setDefaults

 public static function setDefaults(array $values, $merge = false)
 {
     parent::setDefaults($values, $merge);
 }
開發者ID:mattvb91,項目名稱:cphalcon,代碼行數:4,代碼來源:Tag.php

示例5: testDefault

 public function testDefault()
 {
     Tag::setDefault('username', 'dreamsxin');
     $this->assertEquals(Tag::getDefault('username'), 'dreamsxin');
     $data = array('username' => 'dreamsxin', 'email' => 'dreamsxin@qq.com');
     Tag::setDefaults($data);
     $this->assertEquals(Tag::getDefaults(), $data);
 }
開發者ID:UqiOnline,項目名稱:cphalcon7,代碼行數:8,代碼來源:TagTest.php


注:本文中的Phalcon\Tag::setDefaults方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。