- Updates remaining router endpoints to use constructor and new constants
This commit is contained in:
@@ -9,9 +9,14 @@ class Queue {
|
|||||||
const ENDPOINT = 'queue';
|
const ENDPOINT = 'queue';
|
||||||
const ACTION_RUN = 'run';
|
const ACTION_RUN = 'run';
|
||||||
public $allowed_actions = array(self::ACTION_RUN);
|
public $allowed_actions = array(self::ACTION_RUN);
|
||||||
|
public $data;
|
||||||
|
|
||||||
function run($data) {
|
function __construct($data) {
|
||||||
$queue = new Daemon($data);
|
$this->data = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function run() {
|
||||||
|
$queue = new Daemon($this->data);
|
||||||
$queue->run();
|
$queue->run();
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -15,18 +15,23 @@ class Subscription {
|
|||||||
self::ACTION_MANAGE,
|
self::ACTION_MANAGE,
|
||||||
self::ACTION_UNSUBSCRIBE
|
self::ACTION_UNSUBSCRIBE
|
||||||
);
|
);
|
||||||
|
public $data;
|
||||||
|
|
||||||
function confirm($data) {
|
function __construct($data) {
|
||||||
$subscription = new UserSubscription\Pages('confirm', $data);
|
$this->data = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function confirm() {
|
||||||
|
$subscription = new UserSubscription\Pages('confirm', $this->data);
|
||||||
$subscription->confirm();
|
$subscription->confirm();
|
||||||
}
|
}
|
||||||
|
|
||||||
function manage($data) {
|
function manage() {
|
||||||
$subscription = new UserSubscription\Pages('manage', $data);
|
$subscription = new UserSubscription\Pages('manage', $this->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function unsubscribe($data) {
|
function unsubscribe() {
|
||||||
$subscription = new UserSubscription\Pages('unsubscribe', $data);
|
$subscription = new UserSubscription\Pages('unsubscribe', $this->data);
|
||||||
$subscription->unsubscribe();
|
$subscription->unsubscribe();
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -14,7 +14,7 @@ class Track {
|
|||||||
const ENDPOINT = 'track';
|
const ENDPOINT = 'track';
|
||||||
const ACTION_CLICK = 'click';
|
const ACTION_CLICK = 'click';
|
||||||
const ACTION_OPEN = 'open';
|
const ACTION_OPEN = 'open';
|
||||||
const ALLOWED_ACTIONS = array(
|
public $allowed_actions = array(
|
||||||
self::ACTION_CLICK,
|
self::ACTION_CLICK,
|
||||||
self::ACTION_OPEN
|
self::ACTION_OPEN
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user