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 / Blog.php next >
Encoding:
PHP Script  |  2008-07-02  |  1.8 KB  |  68 lines

  1. <?php
  2. /**
  3. * Blog object. Used when multiple blogs are supported by
  4. * one account.
  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. * @see      Services_Blogging_MultipleBlogsInterface
  13. */
  14. class Services_Blogging_Blog
  15. {
  16.     const ERROR_INVALID_PROPERTY = 181;
  17.  
  18.     protected $values = array(
  19.         'id'    => null,
  20.         'name'  => null,
  21.         'url'   => null
  22.     );
  23.  
  24.  
  25.  
  26.     public function __construct($id = null, $name = null, $url = null)
  27.     {
  28.         $this->id   = $id;
  29.         $this->name = $name;
  30.         $this->url  = $url;
  31.     }//public function __construct($id = null, $name = null, $url = null)
  32.  
  33.  
  34.  
  35.     public function __set($strProperty, $value)
  36.     {
  37.         /*
  38.         if (!isset($this->values[$strProperty])) {
  39.             require_once 'Services/Blogging/Exception.php';
  40.             var_dump($this->values);
  41.             echo 'Invalid property "' . $strProperty . '"';
  42.             throw new Services_Blogging_Exception(
  43.                 'Invalid property "' . $strProperty . '"',
  44.                 self::ERROR_INVALID_PROPERTY
  45.             );
  46.         }
  47.         */
  48.         $this->values[$strProperty] = $value;
  49.     }//public function __set($strProperty, $value)
  50.  
  51.  
  52.  
  53.     public function __get($strProperty)
  54.     {
  55.         /*
  56.         if (!isset($this->values[$strProperty])) {
  57.             require_once 'Services/Blogging/Exception.php';
  58.             throw new Services_Blogging_Exception(
  59.                 'Invalid property "' . $strProperty . '"',
  60.                 self::ERROR_INVALID_PROPERTY
  61.             );
  62.         }
  63.         */
  64.         return $this->values[$strProperty];
  65.     }//public function __get($strProperty)
  66.  
  67. }//class Services_Blogging_Blog
  68. ?>