-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored controller configuration to controller_config; refactored …
…UI configuration to UIDispatcher (UI/Main); changed signature of IController::processRequest
- Loading branch information
Showing
17 changed files
with
156 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* Target to controller mappings | ||
* | ||
* The first item is the default if no target is specified. | ||
*/ | ||
$controllers = [ | ||
'main' => ZK\UI\UIController::class, | ||
'addexp' => ZK\Controllers\ExportAdd::class, | ||
'export' => ZK\Controllers\ExportPlaylist::class, | ||
'afile' => ZK\Controllers\ExportAfile::class, | ||
'opensearch' => ZK\Controllers\OpenSearch::class, | ||
'daily' => ZK\Controllers\RunDaily::class, | ||
'print' => ZK\Controllers\PrintTags::class, | ||
'rss' => ZK\Controllers\RSS::class, | ||
'api' => ZK\Controllers\API::class, | ||
'sso' => ZK\Controllers\SSOLogin::class, | ||
'push' => ZK\Controllers\PushServer::class, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2019 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2021 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -29,7 +29,7 @@ | |
use ZK\UI\AddManager; | ||
|
||
class ExportAfile implements IController { | ||
public function processRequest($dispatcher) { | ||
public function processRequest() { | ||
$userAgent = $_SERVER["HTTP_USER_AGENT"]; | ||
?> | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2018 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2021 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -48,7 +48,7 @@ class ExportPlaylist extends CommandTarget implements IController { | |
private $time; | ||
private $records; | ||
|
||
public function processRequest($dispatcher) { | ||
public function processRequest() { | ||
// Ensure user has selected a playlist | ||
$playlist = intval($_REQUEST["playlist"]); | ||
if($playlist == 0) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2018 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2021 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -25,5 +25,5 @@ | |
namespace ZK\Controllers; | ||
|
||
interface IController { | ||
public function processRequest($dispatcher); | ||
public function processRequest(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2018 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2021 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -29,7 +29,7 @@ | |
use ZK\UI\UICommon as UI; | ||
|
||
class OpenSearch implements IController { | ||
public function processRequest($dispatcher) { | ||
public function processRequest() { | ||
$baseURL = UI::getBaseURL(); | ||
$favicon = Engine::param('favicon', 'favicon.ico'); | ||
$banner = Engine::param("station")." ".Engine::param("application"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2018 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2021 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -48,7 +48,7 @@ class PrintTags implements IController { | |
], | ||
]; | ||
|
||
public function processRequest($dispatcher) { | ||
public function processRequest() { | ||
header("Content-type: application/pdf"); | ||
|
||
$form = empty($_REQUEST["form"])?self::LABEL_FORM:$_REQUEST["form"]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2018 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2021 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -34,7 +34,7 @@ | |
class RunDaily implements IController { | ||
private $catCodes; | ||
|
||
public function processRequest($dispatcher) { | ||
public function processRequest() { | ||
if(php_sapi_name() != "cli") { | ||
http_response_code(400); | ||
return; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2020 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2021 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -33,7 +33,7 @@ class SSOLogin implements IController { | |
private $action; | ||
private $ssoOptions; | ||
|
||
public function processRequest($dispatcher) { | ||
public function processRequest() { | ||
$params = SSOCommon::zkQSParams(); | ||
$state = $params["state"]; | ||
if($state) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Zookeeper Online | ||
* | ||
* @author Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2020 Jim Mason <[email protected]> | ||
* @copyright Copyright (C) 1997-2021 Jim Mason <[email protected]> | ||
* @link https://zookeeper.ibinx.com/ | ||
* @license GPL-3.0 | ||
* | ||
|
@@ -36,8 +36,8 @@ | |
* The file is provided as an example of a custom UI controller; | ||
* it is not part of the basic functionality of Zookeeper Online. | ||
*/ | ||
class KzsuUIController extends Main { | ||
protected function emitBodyHeader($dispatcher) { | ||
class KzsuUIController extends UIController { | ||
protected function emitBodyHeader() { | ||
$urls = Engine::param('urls'); | ||
$station_full = Engine::param('station_full'); | ||
?> | ||
|
Oops, something went wrong.