class Posts This class provides two key features.
1: Posts contains static method get() that returns the requested posts based on the passed criteria. Depending on the type of request, different types are returned. See the function for details 2: An instance of Posts functions as an array (by extending ArrayObject) and is returned by Posts::get() as the results of a query. This allows the result of Posts::get() to be iterated (for example, in a foreach construct) and to have properties that can be accessed that describe the results (for example, $posts->onepost).
Located in /system/classes/posts.php (line 21)
ArrayObject | --Posts
Returns an ascending post
function by_slug
select all post content by slug
function by_status
select all posts of a given status
static count_by_tag
return a count of the number of posts with the assigned tag
Returns a descending post
Returns a post or posts based on supplied parameters.
THIS CLASS SHOULD CACHE QUERY RESULTS!
function publish_scheduled_posts
Callback function to publish scheduled posts
Reassigns the author of a specified set of posts
Parses a search string for status, type, author, and tag keywords. Returns an associative array which can be passed to Posts::get(). If multiple authors, statuses, tags, or types are specified, we assume an implicit OR such that (e.g.) any author that matches would be returned.
function update_scheduled_posts_cronjob
Creates or recreates the cronjob to publish scheduled posts. It is called whenever a post is updated or created
Search this Posts object for the needle, returns its key if found
function __get Returns properties of a Posts object.
This is the function that returns information about the set of posts that was requested. This function should offer property names that are identical to properties of instances of the URL class. A call to Posts::get() without parameters should return mostly the same property values as the global $url object for the request. The difference would occur when the data returned doesn't necessarily match the request, such as when several posts are requested, but only one is available to return.
Inherited From ArrayObject (Internal Class)
constructor __construct ( $array )
append ( $value )
asort ( )
count ( )
exchangeArray ( $array )
getArrayCopy ( )
getFlags ( )
getIterator ( )
getIteratorClass ( )
ksort ( )
natcasesort ( )
natsort ( )
offsetExists ( $index )
offsetGet ( $index )
offsetSet ( $index, $newval )
offsetUnset ( $index )
setFlags ( $flags )
setIteratorClass ( $iteratorClass )
uasort ( $cmp_function )
uksort ( $cmp_function )
Documentation generated on Thu, 30 Oct 2008 20:31:24 +0100 by phpDocumentor 1.3.2