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

Class: Content_SimpleGuestbookEntry

Source Location: /content_classes/simpleguestbookentry.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_SimpleGuestbookEntry __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 addSimpleGuestbookEntry [line 85]

int addSimpleGuestbookEntry( array $sqlData)

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



Tags:

return:  Form field id
throws:  Content_SimpleGuestbookEntryException
access:  public


Parameters:

array   $sqlData   Row data

[ Top ]

method countSimpleGuestbookEntries [line 462]

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

Method to count simple guestbook entrys. Takes key=>value array with select count as first argument. Returns array.

List of supported params:

  • book, int, optional: Form id
  • timeframe, string, optional: specific range of rows to return




Tags:

throws:  Content_SimpleGuestbookEntryException
access:  public


Parameters:

array   $params   Count params

[ Top ]

method deleteSimpleGuestbookEntry [line 155]

int deleteSimpleGuestbookEntry( int $id)

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



Tags:

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


Parameters:

int   $id   Simple Guestbook Entry id

[ Top ]

method selectSimpleGuestbookEntries [line 305]

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

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

Returns array.

List of supported params:

  • book, int, optional: Form id
  • start, int, optional: row offset
  • limit, int, optional: amount of rows to return
  • timeframe, string, optional: specific range of rows to return
  • order_marco, string, otpional: How to sort the result set. Supported macros:
    • DATE_MODIFIED: sorty by date modified
    • DATE_ADDED: sort by date added
    • RANDOM: sort by random
    • NAME: sort by name




Tags:

throws:  Content_SimpleGuestbookEntryException
access:  public


Parameters:

array   $params   Select params

[ Top ]

method selectSimpleGuestbookEntry [line 192]

array selectSimpleGuestbookEntry( int $id)

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



Tags:

throws:  Content_SimpleGuestbookEntryException
access:  public


Parameters:

int   $id   Simple Guestbook Entry id

[ Top ]

method simpleGuestbookEntryBelongsToCurrentProject [line 552]

int simpleGuestbookEntryBelongsToCurrentProject( int $simple_guestbook_entry)

Tests whether given simple guestbook entry belongs to current project. Takes the generator book id as first argument.

Returns bool.




Tags:

return:  bool
throws:  Content_SimpleGuestbookEntryException
access:  public


Parameters:

int   $simple_guestbook_entry   Simple Guestbook Entry id

[ Top ]

method simpleGuestbookEntryBelongsToCurrentUser [line 606]

bool simpleGuestbookEntryBelongsToCurrentUser( int $simple_guestbook_entry)

Test whether simple guestbook entry belongs to current user or not.

Takes the generator book id as first argument. Returns bool.




Tags:

throws:  Content_SimpleGuestbookEntryException
access:  public


Parameters:

int   $simple_guestbook_entry   Simple Guestbook Entry id

[ Top ]

method updateSimpleGuestbookEntry [line 113]

int updateSimpleGuestbookEntry( int $id, array $sqlData)

Updates simple guestbook entry. Takes the simple guestbook entry id as first argument, a field=>value array with the new generator form data as second argument. Returns amount of affected rows.



Tags:

return:  Affected rows
throws:  Content_SimpleGuestbookEntryException
access:  public


Parameters:

int   $id   Simple Guestbook Entry id
array   $sqlData   Row data

[ Top ]


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