public function __construct($title, $photo, $date, $text, $author) { $this->title = $title; $this->date = $date; $this->text = $text; $this->author = $author; $this->photo = $photo; $query = new Query('articles'); $this->id = $query->do_query('INR', $title, $photo, $date, $text, $author); }