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

Source for file Driver.php

Documentation is available at Driver.php

  1. <?php
  2. require_once 'Services/Blogging/Post.php';
  3.  
  4. /**
  5. *   A PHP interface to blogging APIs
  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. */
  13. abstract class Services_Blogging_Driver
  14. {
  15.  
  16.     /**
  17.     *   Error code: Username or password doesn't exist/are wrong
  18.     */
  19.     const ERROR_USERIDPASS = 102;
  20.  
  21.  
  22.  
  23.     /**
  24.     *   Save a new post into the blog.
  25.     *
  26.     *   @param Services_Blogging_Post $post     Post object to put online
  27.     *
  28.     *   @return string  The ID assigned to the post
  29.     */
  30.     abstract public function savePost(Services_Blogging_Post $post);
  31.  
  32.  
  33.  
  34.     /**
  35.     *   Delete a given post
  36.     *
  37.     *   @param mixed  $post   Services_Blogging_Post object to delete,
  38.     *                           or post id (integer) to delete
  39.     *   @return boolean     True if deleted, false if not.
  40.     */
  41.     abstract public function deletePost($post);
  42.  
  43.  
  44.  
  45.  
  46.     /**
  47.     *   Returns an array of strings thay define
  48.     *   the properties that a post to this blog may
  49.     *   have.
  50.     *
  51.     *   @return array   Array of strings
  52.     */
  53.     abstract public function getSupportedPostProperties();
  54.  
  55.  
  56.  
  57.     /**
  58.     *   Checks if the given property name/id is supported
  59.     *   for this driver.
  60.     *
  61.     *   @param string $strProperty  Property name/id to check
  62.     *
  63.     *   @return boolean     If the property is supported
  64.     */
  65.     abstract public function isPostPropertySupported($strProperty);
  66.  
  67.  
  68.  
  69.     /**
  70.     *   Creates a new post object and returns that.
  71.     *   Automatically sets the driver object in the post.
  72.     *
  73.     *   @return Services_Blogging_Post  New post object
  74.     */
  75.     public function createNewPost()
  76.     {
  77.         return new Services_Blogging_Post($this);
  78.     }//public function createNewPost()
  79.  
  80. }//abstract class Services_Blogging_Driver
  81. ?>

Documentation generated on Mon, 11 Mar 2019 14:57:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.