当前位置: 首页>>代码示例>>PHP>>正文


PHP Criteria::setIgnoreCase方法代码示例

本文整理汇总了PHP中Criteria::setIgnoreCase方法的典型用法代码示例。如果您正苦于以下问题:PHP Criteria::setIgnoreCase方法的具体用法?PHP Criteria::setIgnoreCase怎么用?PHP Criteria::setIgnoreCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Criteria的用法示例。


在下文中一共展示了Criteria::setIgnoreCase方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: search

 public static function search($query_string, $sf_user, $limit = 12)
 {
     $query_string = trim($query_string);
     if (!is_null($query_string) && !empty($query_string) && '' != $query_string && strlen($query_string) > 3) {
         $criteria = new Criteria();
         $criteria->setIgnoreCase(true);
         $criteria->setLimit($limit);
         $criteria->add(SchoolYearStudentPeer::SCHOOL_YEAR_ID, SchoolYearPeer::retrieveCurrent()->getId());
         $criteria->addJoin(SchoolYearStudentPeer::STUDENT_ID, self::ID);
         $criteria->addJoin(self::PERSON_ID, PersonPeer::ID, Criteria::INNER_JOIN);
         $criteria->addAscendingOrderByColumn(PersonPeer::LASTNAME);
         if (is_numeric($query_string)) {
             // Search by identification number
             $criteria->add(PersonPeer::IDENTIFICATION_NUMBER, $query_string . '%', Criteria::LIKE);
         } else {
             // Search by firstname or lastname
             $criterion = $criteria->getNewCriterion(PersonPeer::FIRSTNAME, $query_string . '%', Criteria::LIKE);
             $criterion->addOr($criteria->getNewCriterion(PersonPeer::LASTNAME, $query_string . '%', Criteria::LIKE));
             $criteria->add($criterion);
         }
         if ($sf_user->isPreceptor()) {
             PersonalPeer::joinWithStudents($criteria, $sf_user->getGuardUser()->getId());
         } elseif ($sf_user->isTeacher()) {
             TeacherPeer::joinWithStudents($criteria, $sf_user->getGuardUser()->getId());
         }
         //FALTA HEAD PRECEPTOR
         return self::doSelectActive($criteria);
     }
     return array();
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:30,代码来源:StudentPeer.php

示例2: retrieveByUuid

 public static function retrieveByUuid($value)
 {
     $c = new Criteria();
     $c->add(self::UUID, $value);
     $c->setIgnoreCase(true);
     return self::doSelectOne($c);
 }
开发者ID:sgrove,项目名称:cothinker,代码行数:7,代码来源:SubdepartmentPeer.php

示例3: addWordColumnCriteria

 public function addWordColumnCriteria(Criteria $criteria, $field, $value)
 {
     $value = "%{$value}%";
     $criteria->setIgnoreCase(true);
     $criterion = $criteria->getNewCriterion(SubjectPeer::NAME, $value, Criteria::LIKE);
     $criterion->addOr($criteria->getNewCriterion(SubjectPeer::FANTASY_NAME, $value, Criteria::LIKE));
     $criteria->add($criterion);
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:8,代码来源:SubjectFormFilter.class.php

示例4: getNbFiles

 public static function getNbFiles($entity, $entity_id)
 {
     $c = new Criteria();
     $c->add(sfFileGalleryPeer::ENTITY, $entity);
     $c->add(sfFileGalleryPeer::ENTITY_ID, $entity_id);
     $c->setIgnoreCase(true);
     return sfFileGalleryPeer::doCount($c);
 }
开发者ID:sgrove,项目名称:cothinker,代码行数:8,代码来源:sfFileGalleryPeer.php

示例5: getByName

 public function getByName($name)
 {
     $c = new Criteria();
     $c->add(NagiosTimeperiodPeer::NAME, $name);
     $c->setIgnoreCase(true);
     $timeperiod = NagiosTimeperiodPeer::doSelectOne($c);
     if (!$timeperiod) {
         return false;
     }
     return $timeperiod;
 }
开发者ID:Evolix,项目名称:lilac,代码行数:11,代码来源:NagiosTimeperiodPeer.php

示例6: getByName

 public function getByName($name)
 {
     $c = new Criteria();
     $c->add(NagiosHostTemplatePeer::NAME, $name);
     $c->setIgnoreCase(true);
     $template = NagiosHostTemplatePeer::doSelectOne($c);
     if (!$template) {
         return false;
     }
     return $template;
 }
开发者ID:Evolix,项目名称:lilac,代码行数:11,代码来源:NagiosHostTemplatePeer.php

示例7: getByName

 public function getByName($name)
 {
     $c = new Criteria();
     $c->add(NagiosContactPeer::NAME, $name);
     $c->setIgnoreCase(true);
     $contact = NagiosContactPeer::doSelectOne($c);
     if (!$contact) {
         return false;
     }
     return $contact;
 }
开发者ID:Evolix,项目名称:lilac,代码行数:11,代码来源:NagiosContactPeer.php

示例8: getByName

 public function getByName($name)
 {
     $c = new Criteria();
     $c->add(NagiosHostgroupPeer::NAME, $name);
     $c->setIgnoreCase(true);
     $hostgroup = NagiosHostgroupPeer::doSelectOne($c);
     if (!$hostgroup) {
         return false;
     }
     return $hostgroup;
 }
开发者ID:Evolix,项目名称:lilac,代码行数:11,代码来源:NagiosHostgroupPeer.php

示例9: import

 public function import()
 {
     $job = $this->getEngine()->getJob();
     $config = $this->getEngine()->getConfig();
     $command = new NagiosCommand();
     $segment = $this->getSegment();
     // First check if we have a use
     $useTemplate = $segment->get("use");
     if ($useTemplate) {
         // Okay, we need to check to see if we have an existing dependency
         $val = $useTemplate[0]['value'];
         $c = new Criteria();
         $c->add(NagiosCommandPeer::NAME, $val);
         $c->setIgnoreCase(true);
         $dependant = NagiosCommandPeer::doSelectOne($c);
         if ($dependant) {
             $command->setLine($dependant->getLine());
         }
         $dependant->clearAllReferences(true);
     }
     $values = $segment->getValues();
     $fileName = $segment->getFilename();
     $commandLine = array();
     foreach ($values as $key => $entries) {
         foreach ($entries as $entry) {
             $value = $entry['value'];
             $lineNum = $entry['line'];
             if (key_exists($key, $this->fieldMethods) && $this->fieldMethods[$key] != '') {
                 if ($key == "command_line") {
                     // Combine into our line array
                     $commandLine[] = $value;
                     continue;
                 }
                 // Okay, let's check that the method DOES exist
                 if (!method_exists($command, $this->fieldMethods[$key])) {
                     $job->addError("Method " . $this->fieldMethods[$key] . " does not exist for variable: " . $key . " on line " . $lineNum . " in file " . $fileName);
                     if (!$config->getVar('continue_error')) {
                         return false;
                     }
                 } else {
                     call_user_method($this->fieldMethods[$key], $command, $value);
                 }
             }
         }
     }
     // re-assemble command
     $commandLine = implode(',', $commandLine);
     $command->setLine($commandLine);
     $command->save();
     $command->clearAllReferences(true);
     $job->addNotice("NagiosCommandImporter finished importing command: " . $command->getName());
     return true;
 }
开发者ID:Evolix,项目名称:lilac,代码行数:53,代码来源:NagiosCommandImporter.php

示例10: addUsernameColumnCriteria

 public function addUsernameColumnCriteria(Criteria $criteria, $field, $value)
 {
     $value = trim($value);
     if ($value != '') {
         $value = "%{$value}%";
         $criteria->setIgnoreCase(true);
         $criteria->addJoin(TeacherPeer::PERSON_ID, PersonPeer::ID);
         $criteria->addJoin(PersonPeer::USER_ID, sfGuardUserPeer::ID);
         $criterion = $criteria->getNewCriterion(sfGuardUserPeer::USERNAME, $value, Criteria::LIKE);
         $criteria->add($criterion);
     }
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:12,代码来源:TeacherFormFilter.class.php

示例11: retrievePager

 public static function retrievePager($c = null, $page = 1, $max = 10)
 {
     if ($c == null) {
         $c = new Criteria();
     }
     $c->addDescendingOrderByColumn(self::LAST_NAME);
     $c->setIgnoreCase(true);
     $pager = new sfPropelPager('sfGuardUserProfile', $max);
     $pager->setCriteria($c);
     $pager->setPeerMethod('doSelectJoinSfGuardUser');
     $pager->setPage($page);
     $pager->init();
     return $pager;
 }
开发者ID:sgrove,项目名称:cothinker,代码行数:14,代码来源:sfGuardUserProfilePeer.php

示例12: getLightboxArray

 public static function getLightboxArray($entity, $entity_id)
 {
     $images = array();
     $c = new Criteria();
     $c->add(sfPhotoGalleryPeer::ENTITY, $entity);
     $c->add(sfPhotoGalleryPeer::ENTITY_ID, $entity_id);
     $c->setIgnoreCase(true);
     $photos = sfPhotoGalleryPeer::doSelect($c);
     if (count($photos) > 0) {
         foreach ($photos as $photo) {
             $images[] = array('real_name' => $photo->getRealName(), 'options' => array('title' => $photo->getDescription()));
         }
     }
     return $images;
 }
开发者ID:sgrove,项目名称:cothinker,代码行数:15,代码来源:sfPhotoGalleryPeer.php

示例13: retrieveByEmail

 public static function retrieveByEmail($value)
 {
     $data = split('@', $value);
     $email = $data[1];
     $c = new Criteria();
     $c->add(self::EMAIL, $email);
     $c->setIgnoreCase(true);
     $result = self::doSelectOne($c);
     if ($result == null) {
         sfContext::getInstance()->getLogger()->log('no matching email domain for (' . $email . ')');
         return false;
     }
     sfContext::getInstance()->getLogger()->log('matching email domain found');
     return $result;
 }
开发者ID:sgrove,项目名称:cothinker,代码行数:15,代码来源:CampusPeer.php

示例14: getByHostTemplateAndDescription

 public static function getByHostTemplateAndDescription($hostTemplateName, $description)
 {
     // First get host template
     $template = NagiosHostTemplatePeer::getByName($hostTemplateName);
     if (!$template) {
         return false;
     }
     $c = new Criteria();
     $c->add(NagiosServicePeer::HOST_TEMPLATE, $template->getId());
     $c->add(NagiosServicePeer::DESCRIPTION, $description);
     $c->setIgnoreCase(true);
     $service = NagiosServicePeer::doSelectOne($c);
     if (!$service) {
         return false;
     }
     return $service;
 }
开发者ID:Evolix,项目名称:lilac,代码行数:17,代码来源:NagiosServicePeer.php

示例15: retrievePager

 public static function retrievePager($c = null, $page = 1, $max = null)
 {
     if ($c == null) {
         $c = new Criteria();
     }
     if ($max == null) {
         $max = sfConfig::get('app_pager_project_max');
     }
     $c->addDescendingOrderByColumn(ProjectPeer::CREATED_AT);
     $c->setIgnoreCase(true);
     $pager = new sfPropelPager('Project', $max);
     $pager->setCriteria($c);
     //$pager->setPeerMethod('doSelectJoinSfGuardUserRelatedByOwnerId');
     $pager->setPage($page);
     $pager->init();
     return $pager;
 }
开发者ID:sgrove,项目名称:cothinker,代码行数:17,代码来源:ProjectPeer.php


注:本文中的Criteria::setIgnoreCase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。