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

Class: Content_SimpleGuestbook

Source Location: /content_classes/simpleguestbook.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_SimpleGuestbook __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 addSimpleGuestbook [line 87]

int addSimpleGuestbook( int $id, array $sqlData)

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



Tags:

return:  Simple guestbook id
throws:  Content_SimpleGuestbookException
access:  public


Parameters:

int   $id   Page id
array   $sqlData   Row data

[ Top ]

method deleteSimpleGuestbook [line 168]

int deleteSimpleGuestbook( int $id)

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



Tags:

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


Parameters:

int   $id   Simple guestbook id

[ Top ]

method selectSimpleGuestbook [line 205]

array selectSimpleGuestbook( int $id)

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



Tags:

throws:  Content_SimpleGuestbookException
access:  public


Parameters:

int   $id   Simple guestbook id

[ Top ]

method selectSimpleGuestbooks [line 323]

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

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

List of supported params:

  • user, int, optional: User/author id
  • book, int, optional: Book 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:
    • BOOK: sorty by book id
    • DATE_MODIFIED: sorty by date modified
    • DATE_ADDED: sort by date added




Tags:

throws:  Content_SimpleGuestbookException
access:  public


Parameters:

array   $params   Select params

[ Top ]

method simpleGuestbookBelongsToCurrentProject [line 471]

int simpleGuestbookBelongsToCurrentProject( int $simple_guestbook)

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



Tags:

return:  bool
throws:  Content_SimpleGuestbookException
access:  public


Parameters:

int   $simple_guestbook   Simple guestbook id

[ Top ]

method simpleGuestbookBelongsToCurrentUser [line 521]

bool simpleGuestbookBelongsToCurrentUser( int $simple_guestbook)

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



Tags:

throws:  Content_SimpleGuestbookException
access:  public


Parameters:

int   $simple_guestbook   Simple guestbook id

[ Top ]

method updateSimpleGuestbook [line 126]

int updateSimpleGuestbook( int $id, array $sqlData)

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

Returns amount of affected rows.




Tags:

return:  Affected rows
throws:  Content_SimpleGuestbookException
access:  public


Parameters:

int   $id   Simple guestbook id
array   $sqlData   Row data

[ Top ]


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