1 | <?php |
||
36 | abstract class Backend { |
||
37 | |||
38 | protected $mMessageLog; |
||
39 | |||
40 | /** |
||
41 | * Lingo\Backend constructor. |
||
42 | * @param MessageLog|null $messages |
||
43 | */ |
||
44 | 2 | public function __construct( MessageLog &$messages = null ) { |
|
52 | |||
53 | /** |
||
54 | * @return MessageLog |
||
55 | */ |
||
56 | public function getMessageLog() { |
||
59 | |||
60 | /** |
||
61 | * This function returns true if the backend is cache-enabled. |
||
62 | * |
||
63 | * Actual caching is done by the parser, but to be cache-enabled the backend |
||
64 | * has to call Lingo\LingoParser::purgeCache when necessary. |
||
65 | * |
||
66 | * @return boolean |
||
67 | */ |
||
68 | 2 | public function useCache() { |
|
71 | |||
72 | /** |
||
73 | * This function returns the next element. The element is an array of four |
||
74 | * strings: Term, Definition, Link, Source. If there is no next element the |
||
75 | * function returns null. |
||
76 | * |
||
77 | * @return Element | null |
||
78 | */ |
||
79 | abstract public function next(); |
||
80 | } |
||
81 | |||
82 |