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:
parent
3d4298fe8b
commit
4ddaddda3d
31 changed files with 1778 additions and 1 deletions
41
lib/ZAPController.class.php
Executable file
41
lib/ZAPController.class.php
Executable 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();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue