Services_Blogging
[ class tree: Services_Blogging ] [ index: Services_Blogging ] [ all elements ]

Source for file ExtendedDriver.php

Documentation is available at ExtendedDriver.php

  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. {
  17.  
  18.     /**
  19.     * Error code: Username or password doesn't exist/are wrong
  20.     */
  21.     const ERROR_POSTDOESNTEXIST = 103;
  22.  
  23.  
  24.  
  25.     /**
  26.     * The getPost method is intended to retrive a given post as an object of
  27.     * the Services_Blogging_Post class; given the unique post id which is passed
  28.     * as a parameter to the function.
  29.     *
  30.     * @param string $id The PostID of the post to be retrieved. (As
  31.     *                     returned by newPost() defined in
  32.     *                     Services_Blogging_driver).
  33.     *
  34.     * @return Services_Blogging_Post The elements of the post returned as an
  35.     *                                 object of the Services_Blogging_Post class.
  36.     *
  37.     * @throws Services_Blogging_Exception If the post does not exist
  38.     */
  39.     abstract public function getPost($id);
  40.  
  41.  
  42.  
  43.     /**
  44.     * Returns an array of recent posts as Services_Blogging_Post objects
  45.     *
  46.     * @param int $number The number of posts to be retrieved.
  47.     *                      Defaults to 15
  48.     *
  49.     * @return Array An array of objects of the Services_Blogging_Post class that
  50.     *                 correspond to the number of posts requested.
  51.     */
  52.     abstract public function getRecentPosts($number = 15);
  53.  
  54.  
  55.  
  56.     /**
  57.     * The getRecentPostTitles method is intended to retrieve the given number of
  58.     * posts titles from a blog.
  59.     * The posts themselves can be retrieved with getPost() or getRecentPosts().
  60.     *
  61.     * @param int $number The number of posts to be retrieved.
  62.     *
  63.     * @return Array An array of int => strings representing the
  64.     *                 post ids (key) and their title (value).
  65.     */
  66.     abstract public function getRecentPostTitles($number = 15);
  67.  
  68.  
  69. }//abstract class Services_Blogging_ExtendedDriver extends Services_Blogging_Driver
  70. ?>

Documentation generated on Mon, 11 Mar 2019 15:25:12 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.