Source for file Post.php
Documentation is available at Post.php
require_once 'Services/Blogging/Driver.php';
* Generic blog post object.
* This class defines a generic post object that may be used
* to send or receive data in a common format to blogs.
* @package Services_Blogging
* @author Anant Narayanan <anant@php.net>
* @author Christian Weiske <cweiske@php.net>
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
* Array with property values.
* The driver that will be used (optional).
* If set, the __set and __get methods can check if the
* properties are allowed or not.
* @var Services_Blogging_Driver
* Class constants that help define the post.
* Title of the blog post entry.
* Text/content for the entry.
const CONTENT = 'content';
* Date at which the post shall be published.
* If set, it has to be a unix timestamp (int)
const PUBDATE = 'publishdate';
* Date at which the post has been written.
* If set, it has to be a unix timestamp (int)
* Where to find the entry. Read-only because
* the blogging service determines it.
* Array of categories (tags) to use.
const CATEGORIES = 'categories';
const CATEGORY = 'categories';
const COMMENTS = 'comments';
const ENCLOSURE = 'enclosure';
* The property isn't supported by the driver.
const ERROR_UNSUPPORTED_PROPERTY = 401;
* Services_Blogging_Post constructor.
* @param Services_Blogging_Driver $driver Optional driver object for further checks
}//public function __construct($driver = null)
public function __set($strProperty, $value)
if ($strProperty == 'id') {
require_once 'Services/Blogging/Exception.php';
} else if ($this->driver !== null
require_once 'Services/Blogging/Exception.php';
'Post property "' . $strProperty . '" is not supported by this driver',
self ::ERROR_UNSUPPORTED_PROPERTY
$this->values[$strProperty] = $value;
}//public function __set($strProperty, $value)
public function __get($strProperty)
if ($strProperty == 'id') {
} else if ($this->driver !== null
require_once 'Services/Blogging/Exception.php';
'Post property "' . $strProperty . '" is not supported by this driver',
self ::ERROR_UNSUPPORTED_PROPERTY
} else if (!isset ($this->values[$strProperty])) {
return $this->values[$strProperty];
}//public function __get($strProperty)
* Sets the post id. This method should only be
* used by the driver implementations that just uploaded
* a post to the blog, and it got an id now.
* @param int The blog post id
public function setId($id)
}//public function setId($id)
}//public function setDriver($driver)
}//class Services_Blogging_Post
Documentation generated on Mon, 11 Mar 2019 14:57:59 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|