forked from yuxel/SourPHP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
45 lines (36 loc) · 971 Bytes
/
Copy pathexample.php
File metadata and controls
45 lines (36 loc) · 971 Bytes
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
<?
require_once("classes/SourPHP.php");
/**
* An example aggregator
*
* @author Osman Yuksel <yuxel |AT| sonsuzdongu |DOT| com>
*/
class EksiAggregator extends SourPHP{
/**
* prints an array in pre tags
*/
function preArray($array){
echo "<pre>";
print_r($array);
echo "</pre>";
echo "<hr/>";
}
/**
* fetch entry id
*/
function fetchEntryById($entryId){
$output= $this->getEntryById($entryId);
$this->preArray($output);
}
/**
* fetch entries of title, which are created after $date
*/
function fetchEntriesAfterThisDate($entryTitle, $date){
$time = strtotime($date);
$output = $this->getEntriesByTitleAfterGivenTime($entryTitle, $time);
$this->preArray($output);
}
}
$aggregator = new EksiAggregator();
$aggregator->fetchEntryById(145878);
$aggregator->fetchEntriesAfterThisDate("neşet ertaş","20.09.2009 21:49");