}
// Action that will redirect the user to the --- share page
public function actionEmail()
{
$message = 'I\'m listening to my favourite radio on https://www.radioguide.fm';
// Create an event for sharing with email
$event = new Event();
$event->type = $event::EVENT_SHARE_EMAIL;
$event->content = 'User shared using Email';
if ($event->save()) {
// Create the redirect url and redirect the user to the url
$redirect = self::URL_SHARE_EMAIL . $message . '&ate=AT-ra-5712cf5c253dbfe1/-/-/5813072dcb4df1b0/5&uid=57727e8e56837512&uud=1&ct=1&ui_email_to=&ui_email_from=&ui_email_note=&pre=http%3A%2F%2Fwww.radioguide.fm%2Fpanel%2Fstations%2Fedit%2F1&tt=0&captcha_provider=recaptcha2&pro=0&ats=imp_url%3D1%26url%3Dhttp%253A%252F%252Fwww.radioguide.fm%252F%26title%3DInternet%2520radio%2520%257C%2520Listen%2520to%2520online%2520radio%2520stations%2520%257C%2520Radioguide.FM%26smd%3Drsi%253D%2526gen%253D0%2526rsc%253D%2526dr%253Dhttp%25253A%25252F%25252Fwww.radioguide.fm%25252Fpanel%25252Fstations%25252Fedit%25252F1%2526sta%253DAT-ra-5712cf5c253dbfe1%25252F-%25252F-%25252F5813072dcb4df1b0%25252F1%26hideEmailSharingConfirmation%3Dundefined%26service%3Demail%26media%3Dundefined%26description%3Dundefined%26passthrough%3Dundefined%26email_template%3Dundefined%26email_vars%3Dundefined&atc=data_track_addressbar%3Dfalse%26username%3Dra-5712cf5c253dbfe1%26services_exclude%3Dskype%26services_exclude_natural%3Dskype%26services_compact%3Dfacebook%252Ctwitter%252Cprint%252Cemail%252Cnujij%252Cgoogle%252Cfavorites%252Cmyspace%252Cdigg%252Cstumbleupon%252Cgmail%252Cmore%26product%3Dundefined%26widgetId%3Dundefined%26pubid%3Dra-5712cf5c253dbfe1%26ui_pane%3Demail&rb=false';
return $this->redirect($redirect);
} else {
return $this->goHome();
}
}
$args = $this->controller->bindActionParams($this, $params);
Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__);
if (Yii::$app->requestedParams === null) {
Yii::$app->requestedParams = $args;
}
return call_user_func_array([$this->controller, $this->actionMethod], $args);
}
}
}
$result = null;
if ($runAction && $this->beforeAction($action)) {
// run the action
$result = $action->runWithParams($params);
$result = $this->afterAction($action, $result);
// call afterAction on modules
foreach ($modules as $module) {
/** @var Module $module */
$parts = $this->createController($route);
if (is_array($parts)) {
/** @var Controller $controller */
list($controller, $actionID) = $parts;
$oldController = Yii::$app->controller;
Yii::$app->controller = $controller;
$result = $controller->runAction($actionID, $params);
if ($oldController !== null) {
Yii::$app->controller = $oldController;
}
return $result;
}
$params = $this->catchAll;
unset($params[0]);
}
try {
Yii::debug("Route requested: '$route'", __METHOD__);
$this->requestedRoute = $route;
$result = $this->runAction($route, $params);
if ($result instanceof Response) {
return $result;
}
$response = $this->getResponse();
if ($result !== null) {
{
try {
$this->state = self::STATE_BEFORE_REQUEST;
$this->trigger(self::EVENT_BEFORE_REQUEST);
$this->state = self::STATE_HANDLING_REQUEST;
$response = $this->handleRequest($this->getRequest());
$this->state = self::STATE_AFTER_REQUEST;
$this->trigger(self::EVENT_AFTER_REQUEST);
$this->state = self::STATE_SENDING_RESPONSE;
$response->send();
require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php'; require __DIR__ . '/../config/bootstrap.php'; $config = require __DIR__ . '/../config/api.php'; (new yii\web\Application($config))->run();
$_COOKIE = [
'PHPSESSID' => 'a1eec9ed68aa4019f3fc805b4f18857e',
];
$_SESSION = [
'__flash' => [],
'country_code' => 'US',
'user_region_id' => unserialize('O:21:"MongoDB\\BSON\\ObjectId":1:{s:3:"oid";s:24:"5bd6c180b5551ee2538b47da";}'),
];