<?php

require_once 'lib/tv/default_channel.php';

class I24hChannel extends DefaultChannel
{
    private $number;
    private $past_epg_days;
    private $future_epg_days;
    private $has_archive;
    private $is_protected;
    private $tariffs;

    public function __construct(
        $id, $title, $icon_url, $streaming_url, $number, $past_epg_days, $future_epg_days, $has_archive, $is_protected, $panel_icon_url,$tariffs = array())
    {
        parent::__construct($id, $title, $icon_url, $streaming_url, $panel_icon_url);
        $this->number = $number;
        $this->past_epg_days = $past_epg_days;
        $this->future_epg_days = $future_epg_days;
        if ($has_archive) {
        	$this->has_archive = $has_archive;
        }
        $this->is_protected = $is_protected;
        $this->tariffs = $tariffs;
    }

    public function get_number()
    { return $this->number; }

    public function get_past_epg_days()
    { return $this->past_epg_days; }

    public function get_future_epg_days()
    { return $this->future_epg_days; }

    public function get_archive_past_sec()
    { return 14 * 86400; }

    public function get_archive_delay_sec()
    { return 0; }
    
    public function has_archive()
    { return isset($this->has_archive); }
    
    public function get_streaming_url()
    { return $this->_streaming_url; }

    public function get_archive_url()
    { return $this->has_archive; }

    public function is_protected()
    { return $this->is_protected; }

    public function get_tariffs($channel_id){
        return !empty($this->tariffs)?$this->tariffs:array();
    }

}

?>
