Docs For Class Pastes

## Pastes

Description

Main model class for pastes table/stikked.

- author: Ben McRedmond <hello@benmcredmond.com>
- version: 0.5.1
- copyright: Ben McRedmond
- access: public

Located in /models/Pastes.php (line 24)

    Model
       |
       --Pastes

Method Summary
Pastes __construct ()
boolean checkPaste ([int $seg = 2])
int countPastes ()
String createPaste ()
void cron ()
array getLists ([string $root = 'lists/'], [int $seg = 2])
array getPaste ([int $seg = 2], [bool|string $replies = false])
Methods
Constructor __construct (line 27)
Pastes __construct ()
checkPaste (line 183)

Checks if a paste exists

- access: public

boolean checkPaste ([int $seg = 2])

- int $seg: URL Segment which the paste id is in

countPastes (line 41)

Counts pastes in the database to be used when generating pagination

- see: Pastes::getLists()
- access: public

int countPastes ()
createPaste (line 56)

Creates a paste in the database. This doesn't take any arguments as it's easier to use the input class.

- access: public

String createPaste ()
cron (line 372)

Finds paste that need to be deleted and deletes them.

- access: public

void cron ()
getLists (line 331)

Gets a list of x most recent pastes according to the amount set in the stikked config file.

- access: public

array getLists ([string $root = 'lists/'], [int $seg = 2])

- string $root: Url root needed for pagination
- int $seg: Segment which determines the page we're on for pagination.

getPaste (line 215)

Gets a specific paste from the database and all its related meta-data

- access: public

array getPaste ([int $seg = 2], [bool|string $replies = false])

- int $seg: URL Segment which the paste id is in
- bool|string $replies: False if you don't want to retrieve replies from the database. Paste ID if you do want to retrieve replies from database. Mostly here for legacy support, eg. iPhone views.

Documentation generated on Mon, 15 Sep 2008 12:57:44 +0100 by phpDocumentor 1.4.2