Skip to content

Commit

Permalink
Add substitution index to lesson
Browse files Browse the repository at this point in the history
  • Loading branch information
mklkj committed Apr 15, 2018
1 parent deb0ed6 commit 0e06752
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"]');
Expand Down

0 comments on commit 0e06752

Please sign in to comment.