Пример #1
0
 public function importValue($value)
 {
     if ($value) {
         Assert::isEqual(get_class($value), $this->className);
     } else {
         return parent::importValue(null);
     }
     return $this->import([$this->getName() => $value->getId()]);
 }
Пример #2
0
 public function importValue($value)
 {
     if ($value) {
         Assert::isInstance($value, $this->className);
         //			Assert::isEqual(get_class($value), $this->className);
     } else {
         return parent::importValue(null);
     }
     return $this->import(array($this->getName() => $value->getId()));
 }
Пример #3
0
 public function importValue($value)
 {
     if ($value instanceof Identifiable) {
         try {
             Assert::isInstance($value, $this->className);
             return $this->import([$this->getName() => $this->actualExportValue($value)]);
         } catch (WrongArgumentException $e) {
             return false;
         }
     }
     return parent::importValue($value);
 }