/** * @param AddSegmentsErrors $errors */ private function isStartTimeWithinEpisodeBounds($errors) { $startTime = $this->segment->getStartTime(); if (!TimeValidator::isSegmentWithinEpisodeBounds($startTime, $this->episode)) { $errors->markStartTimeOutOfEpisodeBounds(); } }
/** * @param Segment $segmentObject * @return array */ private static function processSegmentForWrite($segmentObject) { $startDateString = formatDateStringForDatabaseWrite($segmentObject->getStartTime()); $columnNames = array(self::START_TIME_COLUMN_NAME, self::DURATION_COLUMN_NAME, self::SEGMENT_NAME_COLUMN_NAME, self::AUTHOR_COLUMN_NAME, self::ALBUM_COLUMN_NAME, self::CATEGORY_COLUMN_NAME, self::CAN_CON_COLUMN_NAME, self::NEW_RELEASE_COLUMN_NAME, self::FRENCH_VOCAL_MUSIC_COLUMN_NAME); $values = array($startDateString, $segmentObject->getDuration(), $segmentObject->getName(), $segmentObject->getAuthor(), $segmentObject->getAlbum(), $segmentObject->getCategory(), $segmentObject->isCanCon(), $segmentObject->isNewRelease(), $segmentObject->isFrenchVocalMusic()); return array($columnNames, $values); }