1<?php 2/** 3* Part of the Services_Blogging package. 4* 5* PHP version 5 6* 7* @category Services 8* @package Services_Blogging 9* @author Anant Narayanan <anant@php.net> 10* @author Christian Weiske <cweiske@php.net> 11* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 12* @version CVS: $Id$ 13* @link http://pear.php.net/package/Services_Blogging 14*/ 15 16require_once 'Services/Blogging/Driver.php'; 17 18/** 19* A class extended from Services_Blogging that provides additional abstract 20* functions not present in the original class. These methods have been 21* primarily implemented by the metaWeblog API driver. 22* 23* @category Services 24* @package Services_Blogging 25* @author Anant Narayanan <anant@php.net> 26* @author Christian Weiske <cweiske@php.net> 27* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 28* @link http://pear.php.net/package/Services_Blogging 29*/ 30abstract class Services_Blogging_ExtendedDriver extends Services_Blogging_Driver 31{ 32 33 /** 34 * Error code: Username or password doesn't exist/are wrong 35 */ 36 const ERROR_POSTDOESNTEXIST = 103; 37 38 39 40 /** 41 * The getPost method is intended to retrive a given post as an object of 42 * the Services_Blogging_Post class; given the unique post id which is passed 43 * as a parameter to the function. 44 * 45 * @param string $id The PostID of the post to be retrieved. (As 46 * returned by newPost() defined in 47 * Services_Blogging_driver). 48 * 49 * @return Services_Blogging_Post The elements of the post returned as an 50 * object of the Services_Blogging_Post class. 51 * 52 * @throws Services_Blogging_Exception If the post does not exist 53 */ 54 abstract public function getPost($id); 55 56 57 58 /** 59 * Returns an array of recent posts as Services_Blogging_Post objects 60 * 61 * @param int $number The number of posts to be retrieved. 62 * Defaults to 15 63 * 64 * @return Array An array of objects of the Services_Blogging_Post class that 65 * correspond to the number of posts requested. 66 */ 67 abstract public function getRecentPosts($number = 15); 68 69 70 71 /** 72 * The getRecentPostTitles method is intended to retrieve the given number of 73 * posts titles from a blog. 74 * The posts themselves can be retrieved with getPost() or getRecentPosts(). 75 * 76 * @param int $number The number of posts to be retrieved. 77 * 78 * @return Array An array of int => strings representing the 79 * post ids (key) and their title (value). 80 */ 81 abstract public function getRecentPostTitles($number = 15); 82 83 84}//abstract class Services_Blogging_ExtendedDriver extends Services_Blogging_Driver 85?>