예제 #1
0
 /**
  * @param string[] $map
  * @return bool
  * @throws RangeException
  */
 public function write(array $map)
 {
     if (count($map) > $this->total) {
         throw new RangeException();
     }
     return $this->file->writeArray($map);
 }
예제 #2
0
 /**
  * @param int[] $map
  * @return bool
  * @throws InvalidArgumentException
  */
 public function write(array $map)
 {
     if (count($map) === 0) {
         throw new InvalidArgumentException();
     }
     return $this->file->writeArray($map);
 }