0.9.0 - the ZapV version updated to current php standards. Brave search used, while Bing and Google search api are deprecated

This commit is contained in:
Fabian de Boer 2026-07-15 13:57:05 +02:00
commit 4ddaddda3d
31 changed files with 1778 additions and 1 deletions

41
lib/ZAPController.class.php Executable file
View file

@ -0,0 +1,41 @@
<?php
/**
* Frontend handler
*/
class ZAPController {
/**
* String mode
*/
private $mode;
/**
* Parsable content object
*/
private $action;
/**
* Class prefix
*/
private $prefix = 'ZAP';
/**
* Constructor
*/
public function __construct($mode = 'home') {
$mode = trim(strip_tags($mode));
$this->mode = ucfirst($mode);
$clazz = $this->prefix . $this->mode;
if (!class_exists($clazz)) {
die('Wrong parameter');
}
$this->action = new $clazz();
}
/**
* @return string content
*/
public function fetch() {
return $this->action->getContent();
}
}
?>