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

Source for file Comment.php

Documentation is available at Comment.php

  1. <?php
  2.  
  3. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  4.  
  5. /**
  6.  * Comment endpoint class
  7.  *
  8.  * PHP version 5.1.0+
  9.  *
  10.  * LICENSE: This source file is subject to version 3.0 of the PHP license
  11.  * that is available through the world-wide-web at the following URI:
  12.  * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
  13.  * the PHP License and are unable to obtain it through the web, please
  14.  * send a note to license@php.net so we can mail you a copy immediately.
  15.  *
  16.  * @category    Services
  17.  * @package     Services_Digg
  18.  * @author      Joe Stump <joe@joestump.net>
  19.  * @copyright   1997-2007 The PHP Group
  20.  * @license     http://www.php.net/license/3_0.txt  PHP License 3.0
  21.  * @version     CVS: $Id:$
  22.  * @link        http://pear.php.net/package/Services_Digg
  23.  */
  24.  
  25. /**
  26.  * Services_Digg_Comment
  27.  *
  28.  * @category    Services
  29.  * @package     Services_Digg
  30.  * @author      Joe Stump <joe@joestump.net>
  31.  */
  32. {
  33.     /**
  34.      * Type of comment (story v. gallery photo)
  35.      *
  36.      * @var         string      $type 
  37.      */
  38.     protected $type = 'story';
  39.  
  40.     /**
  41.      * __call
  42.      *
  43.      * @access      public
  44.      * @param       string      $function       Endpoint to call
  45.      * @param       array       $args 
  46.      * @throws      Services_Digg_Exception
  47.      */
  48.     public function __call($functionarray $args)
  49.     {
  50.         $params = array();
  51.         if (isset($args[0]&& is_array($args[0]&& count($args[0])) {
  52.             $params $args[0];
  53.         }
  54.  
  55.         $endPoint '/'$this->type . '/' $this->story . '/comment/' 
  56.                     $this->id . '/' $function;
  57.         return $this->sendRequest($endPoint$params);
  58.     }
  59. }
  60.  
  61. ?>

Documentation generated on Fri, 10 Jul 2009 01:30:03 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.