public function __construct($series, $release_date = 'now', $duration = 0) { parent::__construct($release_date, $duration); if (ObjectType::isValidString($series)) { $this->series = $series; } }
private function set($fieldName, $fieldValue, $maxLength) { if (ObjectType::isValidString($fieldValue)) { $fieldValue = trim($fieldValue); if (strlen($fieldValue) > $maxLength) { $fieldValue = substr($fieldValue, 0, $maxLength); } $this->{$fieldName} = $fieldValue; } return $this; }