ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Factory.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 class Factory
24 {
29  public function assertion(): CrawlerAssertion
30  {
31  return new CrawlerAssertion();
32  }
33 
40  public function exception(int $type = -1, string $info = ""): CrawlerException
41  {
42  return new CrawlerException($type, $info);
43  }
44 }
assertion()
Those assertions are used to wrap the throwing of exception to make to code more readable.
Definition: Factory.php:29
Tests properties and throws exceptions if not met.
exception(int $type=-1, string $info="")
Crawler exceptions for each type of problem that can occur while parsing the entries.
Definition: Factory.php:40