/
schedule.php
62 lines (44 loc) · 1.26 KB
/
schedule.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/*
*
*/
namespace com\amcnetworks\test;
require_once('includes/calculate.php');
require_once('includes/parsed_schedule.php');
require_once('includes/retrieve.php');
class schedule{
private $retrieve, $calculate;
private $schedule_data;
private $parsed_data;
private $count;
function __construct(){
// initialize
$this->retrieve = new includes\retrieve();
$this->calculate = new includes\calculate();
$network = 'IFC';
$show = 'Comedy Bang! Bang!';
try{
# execute the schedule count
}
catch(\Exception $e){
$error = 'Unable to complete: '.$e->getMessage().PHP_EOL;
echo $error;
die();
}
}
# retrieve the schedule data from endpoint, and store in schedule_data property
private function get_schedule($network){
}
# parse the json based schedule, and store in parsed_data property
private function parse_schedule(){
}
# count the number of occurances, and store in count property
private function count_schedule($showname){
}
// output the count
public function get_count(){
echo $this->count.PHP_EOL;
}
}
$schedule = new schedule();
$schedule->get_count();