コード例 #1
0
 public function __construct($series, $release_date = 'now', $duration = 0)
 {
     parent::__construct($release_date, $duration);
     if (ObjectType::isValidString($series)) {
         $this->series = $series;
     }
 }
コード例 #2
0
 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;
 }