Ejemplo n.º 1
0
 public function setStartDate($startDate)
 {
     $this->start_date = $startDate;
     // stocke une version string de la date pour utilisation lors des serialization/deserialization
     if ($startDate) {
         $this->start_date_s = \Sb\Helpers\DateHelper::getDateForDB($startDate);
     }
 }
Ejemplo n.º 2
0
 public function setReadingDate($readingDate)
 {
     $this->reading_date = $readingDate;
     // stocke une version string de la date pour utilisation lors des serialization/deserialization
     if ($this->reading_date) {
         $this->readingDateS = \Sb\Helpers\DateHelper::getDateForDB($this->reading_date);
     }
 }
Ejemplo n.º 3
0
 /**
  * Créé un tableau associatif à partir de l'objet Book
  * @param \Sb\Db\Model\Book $book
  * @param array $properties
  */
 public static function reverseMap(\Sb\Db\Model\Model $book, array &$properties)
 {
     $properties['author'] = $book->getAuthor();
     $properties['description'] = $book->getDescription();
     $properties['isbn10'] = $book->getISBN10();
     $properties['isbn13'] = $book->getISBN13();
     $properties['asin'] = $book->getASIN();
     $properties['id'] = $book->getId();
     $properties['image_binary'] = $book->getImageBinary();
     $properties['image_url'] = $book->getImageUrl();
     $properties['small_image_url'] = $book->getSmallImageUrl();
     $properties['large_image_url'] = $book->getLargeImageUrl();
     $properties['publisher'] = $book->getPublisher();
     $properties['publisher_id'] = $book->getPublisherId();
     $properties['title'] = $book->getTitle();
     if ($book->getCreationDate()) {
         $properties['creation_date'] = \Sb\Helpers\DateHelper::getDateForDB($book->getCreationDate());
     }
     if ($book->getLastModificationDate()) {
         $properties['last_modification_date'] = \Sb\Helpers\DateHelper::getDateForDB($book->getLastModificationDate());
     }
     if ($book->getPublishingDate()) {
         $properties['publishing_date'] = \Sb\Helpers\DateHelper::getDateForDB($book->getPublishingDate());
     }
     $properties['amazon_url'] = $book->getAmazonUrl();
 }
Ejemplo n.º 4
0
 public function setLastModificationDate($lastModificationDate)
 {
     $this->last_modification_date = $lastModificationDate;
     if ($this->last_modification_date) {
         $this->last_modification_date_s = \Sb\Helpers\DateHelper::getDateForDB($this->last_modification_date);
     }
 }