From 0e06752b08256a5c26cc9388154cff0a7ce83f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Sun, 15 Apr 2018 20:48:29 +0200 Subject: [PATCH] Add substitution index to lesson --- src/Table.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Table.php b/src/Table.php index 2993942..6c3ce4e 100644 --- a/src/Table.php +++ b/src/Table.php @@ -154,12 +154,13 @@ private function getLesson(Element $cell, bool $diversion = false): array $subject = $cell->findXPath('./*[@class="p"]'); $lesson = [ - 'teacher' => $this->getLessonPartValues($cell->findXPath('./*[@class="n"]'), 'n'), - 'room' => $this->getLessonPartValues($cell->findXPath('./*[@class="s"]'), 's'), - 'className' => $this->getLessonPartValues($cell->findXPath('./*[@class="o"]'), 'o'), - 'subject' => $subject->text(), - 'diversion' => $diversion, - 'alt' => trim($cell->findXPath('./text()')->text()), + 'teacher' => $this->getLessonPartValues($cell->findXPath('./*[@class="n"]'), 'n'), + 'room' => $this->getLessonPartValues($cell->findXPath('./*[@class="s"]'), 's'), + 'className' => $this->getLessonPartValues($cell->findXPath('./*[@class="o"]'), 'o'), + 'subject' => $subject->text(), + 'diversion' => $diversion, + 'alt' => trim($cell->findXPath('./text()')->text()), + 'substitution' => $cell->findXPath('./*[@class="zas"]')->text(), ]; $subjects = $cell->findXPath('./*[@class="p"]');