Exemple #1
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = EtimeTagPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setEtimeId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setTagId($arr[$keys[1]]);
     }
 }
Exemple #2
0
 public function getEtimeTagsJoinTag($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseEtimeTagPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collEtimeTags === null) {
         if ($this->isNew()) {
             $this->collEtimeTags = array();
         } else {
             $criteria->add(EtimeTagPeer::ETIME_ID, $this->getId());
             $this->collEtimeTags = EtimeTagPeer::doSelectJoinTag($criteria, $con);
         }
     } else {
         $criteria->add(EtimeTagPeer::ETIME_ID, $this->getId());
         if (!isset($this->lastEtimeTagCriteria) || !$this->lastEtimeTagCriteria->equals($criteria)) {
             $this->collEtimeTags = EtimeTagPeer::doSelectJoinTag($criteria, $con);
         }
     }
     $this->lastEtimeTagCriteria = $criteria;
     return $this->collEtimeTags;
 }