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

Source for file MediaObject.php

Documentation is available at MediaObject.php

  1. <?php
  2. /**
  3. * Media object (image, video, sound) in a blog entry.
  4. * Not used currently.
  5. *
  6. @category Services
  7. @package  Services_Blogging
  8. @author   Anant Narayanan <anant@php.net>
  9. @author   Christian Weiske <cweiske@php.net>
  10. @license  http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
  11. @link     http://pear.php.net/package/Services_Blogging
  12. */
  13. {
  14.     const ERROR_INVALID_PROPERTY = 181;
  15.  
  16.     protected $values = array(
  17.         'name'      => null,
  18.         'mimetype'  => null,
  19.         'filename'  => null
  20.     );
  21.  
  22.  
  23.     public function __set($strProperty$value)
  24.     {
  25.         if (!array_key_exists($strProperty$this->values)) {
  26.             require_once 'Services/Blogging/Exception.php';
  27.             throw new Services_Blogging_Exception(
  28.                 'Invalid property "' $strProperty '"',
  29.                 self::ERROR_INVALID_PROPERTY
  30.             );
  31.         }
  32.         $this->values[$strProperty$value;
  33.     }//public function __set($strProperty, $value)
  34.  
  35.  
  36.  
  37.     public function __get($strProperty)
  38.     {
  39.         if (!array_key_exists($strProperty$this->values)) {
  40.             require_once 'Services/Blogging/Exception.php';
  41.             throw new Services_Blogging_Exception(
  42.                 'Invalid property "' $strProperty '"',
  43.                 self::ERROR_INVALID_PROPERTY
  44.             );
  45.         }
  46.         return $this->values[$strProperty];
  47.     }//public function __get($strProperty)
  48.  
  49. }//class Services_Blogging_MediaObject
  50. ?>

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