Exemplo n.º 1
0
 /**
  * findByAttributes
  */
 public function findByAttributes($attributes, $condition = '', $params = array())
 {
     foreach ($attributes as $attribute => $value) {
         if (in_array($attribute, $this->encrypt)) {
             $attributes[$attribute] = $this->encryptDecrypt($value);
         }
     }
     return parent::findByAttributes($attributes, $condition, $params);
 }
Exemplo n.º 2
0
 /**
  *
  * @param array $attributes
  * @param string $condition
  * @param array $params
  * @return CStubActiveRecord 
  */
 public function findByAttributes($attributes, $condition = '', $params = array())
 {
     if (CStubActiveRecord::isUnittests()) {
         return CallFactory::call($this, 'findByAttributes');
     }
     return parent::findByAttributes($attributes, $condition, $params);
 }
 public function findByAttributes($attributes, $condition = '', $params = array())
 {
     return $this->prepareRecord(parent::findByAttributes($attributes, $this->prepareCondition($condition), $params));
 }
 /**
  *
  * Overriding parent implementation to allow transforming of the ip_address attribute from human readable format
  * to db level format (varbinary(16) is the column data type).
  *
  * @param array $attributes
  * @param mixed $condition
  * @param array $params
  *
  * @return PageViewBookeeping
  */
 public function findByAttributes($attributes, $condition = '', $params = array())
 {
     foreach ($attributes as $attr_name => $value) {
         if ($attr_name === 'ip_address') {
             // transform the IP from human readable format to varbinary
             $attributes[$attr_name] = inet_pton($value);
             break;
         }
     }
     return parent::findByAttributes($attributes, $condition, $params);
 }