home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / php / PEAR / Services / Blogging / ExtendedDriver.php < prev    next >
Encoding:
PHP Script  |  2008-07-02  |  2.3 KB  |  71 lines

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