c217515d |
<?php
class Lochness extends Restaurant {
function __construct() {
$day = date('N'); |
3dfeaece |
$row = 3*$day - 1; |
c217515d |
parent::__construct(
"Lochness",
"http://www.lochnesspub.sk/category/obedove-menu/", |
3dfeaece |
['Polievka aj zradlo' => "/html/body/div[3]/div/div/div[1]/table/tbody/tr[$row]/td[2]/text()"] |
c217515d |
);
}
|
3dfeaece |
/**
* @param DOMNodeList $parentNode
* @param iOutput $logger
* @return bool
*/ |
c217515d |
public function runCallbackParser($parentNode, iOutput $logger) {
|
1891b5ae |
$parsed = '';
|
3dfeaece |
foreach ($parentNode as $node) |
c217515d |
{ |
1891b5ae |
$meal = trim($node->nodeValue);
$logger->addMeal($meal);
$parsed .= $meal; |
c217515d |
}
|
1891b5ae |
return $parsed; |
c217515d |
}
} |