mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-12 01:05:47 +00:00

- refactor episode, podcast and category entities to add dynamic properties - refactor Routes when adding feed route - update migration files to better fit itunes' and rss' specs - update podcast and episode forms - add SimpleRSSElement class to Libraries - add rss_helper - update home controller to redirect if system has only one podcast
58 lines
1.5 KiB
PHP
58 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Controllers;
|
|
|
|
/**
|
|
* Class BaseController
|
|
*
|
|
* BaseController provides a convenient place for loading components
|
|
* and performing functions that are needed by all your controllers.
|
|
* Extend this class in any new controllers:
|
|
* class Home extends BaseController
|
|
*
|
|
* For security be sure to declare any new methods as protected or private.
|
|
*
|
|
* @package CodeIgniter
|
|
*/
|
|
|
|
use CodeIgniter\Controller;
|
|
|
|
class BaseController extends Controller
|
|
{
|
|
/**
|
|
* An array of helpers to be loaded automatically upon
|
|
* class instantiation. These helpers will be available
|
|
* to all other controllers that extend BaseController.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $helpers = ['analytics'];
|
|
|
|
/**
|
|
* Constructor.
|
|
*/
|
|
public function initController(
|
|
\CodeIgniter\HTTP\RequestInterface $request,
|
|
\CodeIgniter\HTTP\ResponseInterface $response,
|
|
\Psr\Log\LoggerInterface $logger
|
|
) {
|
|
// Do Not Edit This Line
|
|
parent::initController($request, $response, $logger);
|
|
|
|
//--------------------------------------------------------------------
|
|
// Preload any models, libraries, etc, here.
|
|
//--------------------------------------------------------------------
|
|
// E.g.:
|
|
// $this->session = \Config\Services::session();
|
|
|
|
set_user_session_country();
|
|
set_user_session_browser();
|
|
set_user_session_referer();
|
|
}
|
|
|
|
protected static function triggerWebpageHit($postcast_id)
|
|
{
|
|
webpage_hit($postcast_id);
|
|
}
|
|
}
|