Class Post

Description

Implements interfaces:

Located in /system/classes/post.php (line 18)

QueryRecord
   |
   --Post
Variable Summary
static mixed $post_status_list
static mixed $post_type_list_active
static mixed $post_type_list_all
mixed $url_args
Method Summary
static void activate_post_type ( $type)
static none add_new_status (string $status, [bool $internal = false])
static none add_new_type (string $type, [bool $active = true])
static Post create (array $paramarray)
static void deactivate_post_type ( $type)
static array default_fields ()
static Post get ([array $paramarray = array()])
static array list_active_post_types ([bool $refresh = false])
static array list_all_post_types ([bool $refresh = false])
static array list_post_statuses ([bool $all = true], [ $refresh = false])
static mixed status (mixed $name)
static mixed status_name (mixed $status)
static mixed type (mixed $name)
static mixed type_name (mixed $type)
Post __construct ([array $paramarray = array()])
void add_permission (string $permission)
Post ascend ([ $params = null])
string content_type ()
void delete ()
Post descend ([ $params = null])
array get_url_args ()
void insert ()
boolean publish ()
void update ([bool $minor = true])
mixed __call (string $name, array $args)
mixed __get (string $name)
mixed __set (string $name,  $value)
Variables
static mixed $post_status_list = array() (line 21)
static mixed $post_type_list_active = array() (line 22)
static mixed $post_type_list_all = array() (line 23)
mixed $url_args (line 31)
  • access: protected

Inherited Variables

Inherited from QueryRecord

QueryRecord::$fields
QueryRecord::$newfields
QueryRecord::$unsetfields
Methods
static method activate_post_type (line 74)
  • access: public
static void activate_post_type ( $type)
  • $type
static method add_new_status (line 240)

inserts a new post status into the database, if it doesn't exist

  • access: public
static none add_new_status (string $status, [bool $internal = false])
  • string $status: The name of the new post status
  • bool $internal: Whether this status is for internal use only. If true, this status will NOT be presented to the user
static method add_new_type (line 213)

inserts a new post type into the database, if it doesn't exist

  • access: public
static none add_new_type (string $type, [bool $active = true])
  • string $type: The name of the new post type
  • bool $active: Whether the new post type is active or not
static method create (line 341)

Create a post and save it.

  • return: The new Post object
static Post create (array $paramarray)
  • array $paramarray: An associative array of post fields
static method deactivate_post_type (line 92)
  • access: public
static void deactivate_post_type ( $type)
  • $type
static method default_fields (line 258)

Return the defined database columns for a Post.

  • return: Array of columns in the Post table
  • access: public
static array default_fields ()
static method get (line 310)

Return a single requested post.

  1.  $postPost::getarray'slug' => 'wooga' ) );

  • return: The first post that matched the given criteria
static Post get ([array $paramarray = array()])
  • array $paramarray: An associated array of parameters, or a querystring
static method list_active_post_types (line 38)

returns an associative array of active post types

  • return: An array of post type names => integer values
  • access: public
static array list_active_post_types ([bool $refresh = false])
  • bool $refresh: whether to force a refresh of the cached values
static method list_all_post_types (line 57)

returns an associative array of all post types

  • return: An array of post type names => (integer values, active values)
  • access: public
static array list_all_post_types ([bool $refresh = false])
  • bool $refresh: whether to force a refresh of the cached values
static method list_post_statuses (line 110)

returns an associative array of post statuses

  • return: An array of post statuses names => interger values
  • access: public
static array list_post_statuses ([bool $all = true], [ $refresh = false])
  • bool $all: whether to force a refresh of the cached values
  • $refresh
static method status (line 144)

returns the interger value of the specified post status, or false

  • return: an integer or boolean false
  • access: public
static mixed status (mixed $name)
  • mixed $name: a post status name or value
static method status_name (line 161)

returns the friendly name of a post status, or null

  • return: a string of the status name, or null
  • access: public
static mixed status_name (mixed $status)
  • mixed $status: a post status value, or name
static method type (line 178)

returns the integer value of the specified post type, or false

  • return: an integer or boolean false
  • access: public
static mixed type (mixed $name)
  • mixed $name: a post type name or number
static method type_name (line 195)

returns the friendly name of a post type, or null

  • return: a string of the post type, or null
  • access: public
static mixed type_name (mixed $type)
  • mixed $type: a post type number, or name
Constructor __construct (line 280)

Constructor for the Post class.

  • access: public
Post __construct ([array $paramarray = array()])
  • array $paramarray: an associative array of initial Post field values.

Redefinition of:
QueryRecord::__construct()
constructor __construct Constructor for the QueryRecord class.
add_permission (line 1012)

Add a permission to a post

  • access: public
void add_permission (string $permission)
  • string $permission: The name of the permission to add
ascend (line 974)

Returns the ascending post, relative to this post, according to params

  • return: The ascending post
  • access: public
Post ascend ([ $params = null])
  • $params
content_type (line 995)

Return the content type of this object

  • return: The content type of this object
  • see: IsContent
  • access: public
string content_type ()

Implementation of:
IsContent::content_type()
Returns the content type of the object instance
create_default_permissions (line 1003)

Creates default permissions on a post

  • access: public
void create_default_permissions ()
delete (line 674)

function delete

Deletes an existing post

  • access: public
void delete ()

Redefinition of:
QueryRecord::delete()
This is the public interface that deletes a record
delete_permissions (line 1023)

Deletes permissions on a post

  • access: public
void delete_permissions ()
descend (line 984)

Returns the descending post, relative to this post, according to params

  • return: The descending post
  • access: public
Post descend ([ $params = null])
  • $params
get_url_args (line 958)

Returns a set of properties used by URL::get to create URLs

  • return: Properties of this post used to build a URL
  • access: public
array get_url_args ()

Redefinition of:
QueryRecord::get_url_args()
Returns an array with the current field settings
insert (line 575)

function insert

Saves a new post to the posts table

  • access: public
void insert ()

Redefinition of:
QueryRecord::insert()
This is the public interface that inserts a record
publish (line 713)

function publish

Updates an existing post to published status

  • return: True on success, false if not
  • access: public
boolean publish ()
update (line 619)

function update

Updates an existing post in the posts table

  • access: public
void update ([bool $minor = true])
  • bool $minor: Indicates if this is a major or minor update

Redefinition of:
QueryRecord::update()
This is the public interface that updates a record
__call (line 835)

Handle calls to this Post object that are implemented by plugins

  • return: The value returned from any plugin filters, null if no value is returned
  • access: public
mixed __call (string $name, array $args)
  • string $name: The name of the function called
  • array $args: Arguments passed to the function call
__get (line 752)

function __get

Overrides QueryRecord __get to implement custom object properties

  • return: The requested field value
  • access: public
mixed __get (string $name)
  • string $name: Name of property to return

Redefinition of:
QueryRecord::__get()
function __get
__set (line 811)

function __set

Overrides QueryRecord __get to implement custom object properties

  • return: The requested field value
  • access: public
mixed __set (string $name,  $value)
  • string $name: Name of property to return
  • $value

Redefinition of:
QueryRecord::__set()
function __set

Inherited Methods

Inherited From QueryRecord

QueryRecord::__construct()
QueryRecord::delete()
QueryRecord::deleteRecord()
QueryRecord::exclude_fields()
QueryRecord::get_url_args()
QueryRecord::insert()
QueryRecord::insertRecord()
QueryRecord::list_excluded_fields()
QueryRecord::to_array()
QueryRecord::update()
QueryRecord::updateRecord()
QueryRecord::__get()
QueryRecord::__isset()
QueryRecord::__set()

Documentation generated on Thu, 30 Oct 2008 20:31:23 +0100 by phpDocumentor 1.3.2