* PrinterNavigation.php
(BSPrinterNavigation::addFocus): Make sure the key is unique and exists before accepting it
(BSPrinterNavigation::addSection): ditto
*/
public function addFocus($key)
{
+ if (sizeof($this->structure->xpath('//*[@key="' . $key . '"]')) != 1)
+ {
+ throw new Exception('The key passed to BSPrinterNavigation::addFocus() is either too vague or nonexistent');
+ }
$this->focusKeys[] = $key;
}
*/
public function addSection($key)
{
+ if (sizeof($this->structure->xpath('//*[@key="' . $key . '"]')) != 1)
+ {
+ throw new Exception('The key passed to BSPrinterNavigation::addSection() is either too vague or nonexistent');
+ }
$this->displaySections[] = $key;
}