Example #1
0
 /**
  * @param File $_file
  */
 public function setImageFile(File $_file)
 {
     if (!$_file->isImage()) {
         throw new InvalidArgumentException("File must be of type 'Image'.");
     }
     $this->_image_file = $_file;
     $query = "UPDATE `user` SET image_file_id = :fi WHERE id = :id";
     $args = ["fi" => $this->image_file_id = $_file->getId(), "id" => $this->id];
     $this->_pdo->perform($query, $args);
 }