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

Class: Content_SimplePage

Source Location: /content_classes/simplepage.class.php

Class Overview




Variables

Methods



Class Details

[line 38]


[ Top ]


Class Variables

static $instance =  null

[line 45]

Singleton



Tags:

access:  public

Type:   object


[ Top ]

$base =  null

[line 52]

Reference to base class



Tags:

access:  public

Type:   object


[ Top ]



Class Methods


constructor __construct [line 59]

Content_SimplePage __construct( )

Start instance of base class, load configuration and establish database connection. Please don't call the constructor direcly, use the singleton pattern instead.



Tags:

access:  public


[ Top ]

method addSimplePage [line 87]

int addSimplePage( int $id, array $sqlData)

Adds simple page to the simple page table. Takes the page id as first argument and a field=>value array with simple page data as second argument. Returns insert id.



Tags:

return:  Simple page
throws:  Content_SimplePageException
access:  public


Parameters:

int   $id   Page id
array   $sqlData   Row data

[ Top ]

method deleteSimplePage [line 168]

int deleteSimplePage( int $id)

Removes simple page from the simple pages table. Takes the simple page id as first argument. Returns amount of affected rows.



Tags:

return:  Amount of affected rows
throws:  Content_SimplePageException
access:  public


Parameters:

int   $id   Simple page id

[ Top ]

method selectSimplePage [line 205]

array selectSimplePage( int $id)

Selects one simple page. Takes the simple page id as first argument. Returns array with simple page information.



Tags:

throws:  Content_SimplePageException
access:  public


Parameters:

int   $id   Simple page id

[ Top ]

method selectSimplePages [line 330]

array selectSimplePages( [array $params = array()])

Method to select one or more simple pages. Takes key=>value array with select params as first argument. Returns array.

List of supported params:

  • user, int, optional: User/author id
  • page, int, optional: Page id
  • start, int, optional: row offset
  • limit, int, optional: amount of rows to return
  • order_marco, string, otpional: How to sort the result set. Supported macros:
    • PAGE: sorty by page id
    • DATE_MODIFIED: sorty by date modified
    • DATE_ADDED: sort by date added




Tags:

throws:  Content_SimplePageException
access:  public


Parameters:

array   $params   Select params

[ Top ]

method simplePageBelongsToCurrentProject [line 489]

int simplePageBelongsToCurrentProject( int $simple_page)

Tests whether given simple page belongs to current project. Takes the simple page id as first argument. Returns bool.



Tags:

return:  bool
throws:  Content_SimplePageException
access:  public


Parameters:

int   $simple_page   Simple page id

[ Top ]

method simplePageBelongsToCurrentUser [line 539]

bool simplePageBelongsToCurrentUser( int $simple_page)

Test whether simple page belongs to current user or not. Takes the simple page id as first argument. Returns bool.



Tags:

throws:  Content_SimplePageException
access:  public


Parameters:

int   $simple_page   Simple page id

[ Top ]

method updateSimplePage [line 126]

int updateSimplePage( int $id, array $sqlData)

Updates simple page. Takes the simple page id as first argument, a field=>value array with the new simple page data as second argument.

Returns amount of affected rows.




Tags:

return:  Affected rows
throws:  Content_SimplePageException
access:  public


Parameters:

int   $id   Simple page id
array   $sqlData   Row data

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:52:02 +0100 by phpDocumentor 1.4.3