Пример #1
0
 /**
  * @param \ride\application\orm\entry\AuthorEntry $author 
  * @return null
  */
 public function setAuthor(AliasAuthorEntry $author = NULL)
 {
     $isClean = false;
     if (!$this->author && !$author || $this->author && $author && $this->author->getId() === $author->getId()) {
         $isClean = true;
     }
     $this->author = $author;
     if (!$isClean && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
 }
Пример #2
0
 /**
  * @param \ride\application\orm\entry\AuthorEntry $entry 
  * @return null
  */
 public function setEntry(AliasAuthorEntry $entry = NULL)
 {
     $isClean = false;
     if (!$this->entry && !$entry || $this->entry && $entry && $this->entry->getId() === $entry->getId()) {
         $isClean = true;
     }
     $this->entry = $entry;
     if (!$isClean && $this->entryState === self::STATE_CLEAN) {
         $this->entryState = self::STATE_DIRTY;
     }
 }
Пример #3
0
 /**
  * @param \ride\application\orm\entry\AuthorEntry $author 
  * @return null
  */
 public function setAuthor(AuthorEntry $author = NULL)
 {
     if (!isset($this->loadedFields['author'])) {
         $this->loadProperties();
     }
     $oldValue = null;
     if (array_key_exists('author', $this->loadedValues)) {
         $oldValue = $this->loadedValues['author'];
     }
     if (!$oldValue && !$author || $oldValue && $author && $oldValue->getId() === $author->getId()) {
         $this->author = $author;
         return;
     }
     return parent::setAuthor($author);
 }
Пример #4
0
 /**
  * @param \ride\application\orm\entry\AuthorEntry $entry 
  * @return null
  */
 public function setEntry(AuthorEntry $entry = NULL)
 {
     if (!isset($this->loadedFields['entry'])) {
         $this->loadProperties();
     }
     $oldValue = null;
     if (array_key_exists('entry', $this->loadedValues)) {
         $oldValue = $this->loadedValues['entry'];
     }
     if (!$oldValue && !$entry || $oldValue && $entry && $oldValue->getId() === $entry->getId()) {
         $this->entry = $entry;
         return;
     }
     return parent::setEntry($entry);
 }