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


PHP Criterion類代碼示例

本文整理匯總了PHP中Criterion的典型用法代碼示例。如果您正苦於以下問題:PHP Criterion類的具體用法?PHP Criterion怎麽用?PHP Criterion使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: doSelectFiltered

 public static function doSelectFiltered(Criteria $criteria, $con = null)
 {
     $criteria->add(VSpecPeer::PARENT, 1, Criteria::IN);
     $c3 = $criteria->getCriterion(VSpecPeer::PARENT);
     $c4 = new Criterion($criteria, VSpecPeer::PARENT, 7, Criteria::IN);
     $c5 = new Criterion($criteria, VSpecPeer::PARENT, 0, Criteria::IN);
     $c4->addOr($c5);
     $c3->addOr($c4);
     $tmp_depts = VSpecPeer::doSelect($criteria);
     $depts = array();
     foreach ($tmp_depts as $key => $val) {
         $pi = $val->getParentalIndex();
         $prefix = '';
         for ($i = 0; $i < $val->level - 1; $i++) {
             $prefix .= ParamsPeer::retrieveByCode('tree_node_mark')->getValue();
         }
         $val->setCode($prefix . $val->getCode());
         $val->setDescription($prefix . $val->getDescription());
         $depts[$pi] = $val;
     }
     ksort($depts);
     $result = array();
     foreach ($depts as $r) {
         $result[] = $r;
     }
     return $result;
 }
開發者ID:taryono,項目名稱:school,代碼行數:27,代碼來源:VSpecPeer.php

示例2: import

 public function import()
 {
     $objPHPExcel = @PHPExcel_IOFactory::load($this->file->getTempName());
     /** @var PHPExcel_Worksheet $worksheet */
     foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
         $rowIterator = $worksheet->getRowIterator();
         /** @var PHPExcel_Worksheet_Row $row  */
         foreach ($rowIterator as $row) {
             $criterion = new Criterion();
             $criterion->Decision = $this->decision;
             $cellIterator = $row->getCellIterator();
             $cellIterator->setIterateOnlyExistingCells();
             /** @var PHPExcel_Cell $cell*/
             foreach ($cellIterator as $cell) {
                 if (!is_null($cell)) {
                     $column = $cell->getColumn();
                     if ($column == 'A') {
                         $criterion->name = $cell->getValue();
                         $criterion->save();
                     } else {
                         if ($column == 'B') {
                             $criterion->description = $cell->getValue();
                             $criterion->save();
                         }
                     }
                 }
             }
         }
     }
 }
開發者ID:sensorsix,項目名稱:app,代碼行數:30,代碼來源:CriterionImporter.class.php

示例3: canAdd

 /**
  * @param Criterion $criterion
  * @return bool
  */
 public function canAdd(Criterion $criterion)
 {
     $allowedKeys = $this->getAllowedKeys();
     if (empty($allowedKeys)) {
         return true;
     }
     return in_array($criterion->getKey(), $allowedKeys);
 }
開發者ID:madlines,項目名稱:criteria,代碼行數:12,代碼來源:Criteria.php

示例4: getCompaniesWithStatusCriteria

 public function getCompaniesWithStatusCriteria($status)
 {
     $criteria = new SelectCriteria($this->getDomain());
     $statusCriteria = Criterion::_eq($this->getDomain(), "status", $status);
     $criteria->setCriteria($statusCriteria);
     return $criteria;
 }
開發者ID:euBatham,項目名稱:javacature,代碼行數:7,代碼來源:CompanyDAO.class.php

示例5: __construct

 public function __construct($id = null, $type = null, $CriterionType = null)
 {
     parent::__construct();
     $this->id = $id;
     $this->type = $type;
     $this->CriterionType = $CriterionType;
 }
開發者ID:sonicgd,項目名稱:google-adwords-api-light,代碼行數:7,代碼來源:BusinessHour.php

示例6: getEntityWithLowerPosition

 public function getEntityWithLowerPosition(Page $movedEntity)
 {
     $criteria = new SelectCriteria($this->getDomain());
     $criteria->setCriteria(Criterion::_gt($this->getDomain(), "position", $movedEntity->getPosition()));
     $criteria->addTransformer(Transformer::_limit(1));
     $criteria->addTransformer(Transformer::_orderBy($this->getDomain(), "position", false));
     return $criteria->toUnique();
 }
開發者ID:euBatham,項目名稱:javacature,代碼行數:8,代碼來源:PageDAO.class.php

示例7: __construct

 public function __construct($name = null, $countryCode = null, $id = null, $type = null, $CriterionType = null)
 {
     parent::__construct();
     $this->name = $name;
     $this->countryCode = $countryCode;
     $this->id = $id;
     $this->type = $type;
     $this->CriterionType = $CriterionType;
 }
開發者ID:anton-github,項目名稱:google-adwords-api-light,代碼行數:9,代碼來源:Carrier.php

示例8: __construct

 public function __construct($channelId = null, $channelName = null, $id = null, $type = null, $CriterionType = null)
 {
     parent::__construct();
     $this->channelId = $channelId;
     $this->channelName = $channelName;
     $this->id = $id;
     $this->type = $type;
     $this->CriterionType = $CriterionType;
 }
開發者ID:sonicgd,項目名稱:google-adwords-api-light,代碼行數:9,代碼來源:YouTubeChannel.php

示例9: __construct

 public function __construct($feedId = null, $matchingFunction = null, $id = null, $type = null, $CriterionType = null)
 {
     parent::__construct();
     $this->feedId = $feedId;
     $this->matchingFunction = $matchingFunction;
     $this->id = $id;
     $this->type = $type;
     $this->CriterionType = $CriterionType;
 }
開發者ID:antonsmolin,項目名稱:google-ads-api-namespaced,代碼行數:9,代碼來源:LocationGroups.php

示例10: __construct

 public function __construct($userInterestId = null, $userInterestName = null, $id = null, $type = null, $CriterionType = null)
 {
     parent::__construct();
     $this->userInterestId = $userInterestId;
     $this->userInterestName = $userInterestName;
     $this->id = $id;
     $this->type = $type;
     $this->CriterionType = $CriterionType;
 }
開發者ID:anton-github,項目名稱:google-adwords-api-light,代碼行數:9,代碼來源:CriterionUserInterest.php

示例11: __construct

 public function __construct($mobileAppCategoryId = null, $displayName = null, $id = null, $type = null, $CriterionType = null)
 {
     parent::__construct();
     $this->mobileAppCategoryId = $mobileAppCategoryId;
     $this->displayName = $displayName;
     $this->id = $id;
     $this->type = $type;
     $this->CriterionType = $CriterionType;
 }
開發者ID:anton-github,項目名稱:google-adwords-api-light,代碼行數:9,代碼來源:MobileAppCategory.php

示例12: __construct

 public function __construct($text = null, $locale = null, $id = null, $type = null, $CriterionType = null)
 {
     parent::__construct();
     $this->text = $text;
     $this->locale = $locale;
     $this->id = $id;
     $this->type = $type;
     $this->CriterionType = $CriterionType;
 }
開發者ID:nediam,項目名稱:adwords-lib,代碼行數:9,代碼來源:ProductService.php

示例13: __construct

 public function __construct($appId = null, $displayName = null, $id = null, $type = null, $CriterionType = null)
 {
     parent::__construct();
     $this->appId = $appId;
     $this->displayName = $displayName;
     $this->id = $id;
     $this->type = $type;
     $this->CriterionType = $CriterionType;
 }
開發者ID:anton-github,項目名稱:google-adwords-api-light,代碼行數:9,代碼來源:MobileApplication.php

示例14: __construct

 public function __construct($conditions = null, $text = null, $id = null, $type = null, $CriterionType = null)
 {
     parent::__construct();
     $this->conditions = $conditions;
     $this->text = $text;
     $this->id = $id;
     $this->type = $type;
     $this->CriterionType = $CriterionType;
 }
開發者ID:anton-github,項目名稱:google-adwords-api-light,代碼行數:9,代碼來源:Product.php

示例15: __construct

 public function __construct($partitionType = null, $parentCriterionId = null, $caseValue = null, $id = null, $type = null, $CriterionType = null)
 {
     parent::__construct();
     $this->partitionType = $partitionType;
     $this->parentCriterionId = $parentCriterionId;
     $this->caseValue = $caseValue;
     $this->id = $id;
     $this->type = $type;
     $this->CriterionType = $CriterionType;
 }
開發者ID:anton-github,項目名稱:google-adwords-api-light,代碼行數:10,代碼來源:ProductPartition.php


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