Overview

Packages

  • None
  • Pastie

Classes

  • PasteForm
  • Pastie
  • Pastie_Driver
  • Pastie_Driver_Sql
  • Overview
  • Package
  • Class
  • Tree

Class Pastie_Driver_Sql

Pastie storage implementation for PHP's PEAR database abstraction layer.

Required values for $params:

'phptype' - The database type (e.g. 'pgsql', 'mysql', etc.).
'table' - The name of the foo table in 'database'.
'charset' - The database's internal charset.

Required by some database implementations:

'database' - The name of the database.
'hostspec' - The hostname of the database server.
'protocol' - The communication protocol ('tcp', 'unix', etc.).
'username' - The username with which to connect to the database.
'password' - The password associated with 'username'.
'options' - Additional options to pass to the database.
'tty' - The TTY on which to connect to the database.
'port' - The port on which to connect to the database.

The table structure can be created by the scripts/sql/pastie_foo.sql script.

Copyright 2007-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (BSD). If you did not receive this file, see http://www.fsf.org/copyleft/bsd.html.

Pastie_Driver
Extended by Pastie_Driver_Sql
Package: Pastie
Author: Ben Klang ben@alkaloid.net
Located at Driver/Sql.php
Methods summary
public
# __construct( array $params = array() )

Constructs a new SQL storage object.

Constructs a new SQL storage object.

Parameters

$params
A hash containing connection parameters.
public
# savePaste( mixed $bin, mixed $paste, mixed $syntax = 'none', mixed $title = '' )
public array
# getPaste( array $params )

Retrieves the paste from the database.

Retrieves the paste from the database.

Parameters

$params
Array of selectors to find the paste.

Returns

array
Array of paste information
public
# getPastes( mixed $bin, mixed $limit = null, mixed $start = null )
Methods inherited from Pastie_Driver
factory(), singleton()
API documentation generated by ApiGen