PHP Класс Pastie_Driver_Sql, horde
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.sql
script.
Copyright 2007-2016 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (BSD). If you
did not receive this file, see http://www.horde.org/licenses/bsd.
Показать файл
Открыть проект
Защищенные свойства (Protected)
Свойство |
Тип |
Описание |
|
$_connected |
boolean |
Boolean indicating whether or not we're connected to the SQL server. |
|
$_db |
DB |
Handle for the current database connection. |
|
$_params |
array |
Hash containing connection parameters. |
|
$_write_db |
DB |
Handle for the current database connection, used for writing. Defaults
to the same handle as $_db if a separate write database is not required. |
|
Открытые методы
Метод |
Описание |
|
__construct ( array $params = [] ) |
Constructs a new SQL storage object. |
|
getPaste ( array $params ) : array |
Retrieves the paste from the database. |
|
getPastes ( $bin, $limit = null, $start = null ) |
|
|
savePaste ( $bin, $paste, $syntax = 'none', $title = '' ) |
|
|
Защищенные методы
Метод |
Описание |
|
_connect ( ) |
Attempts to open a persistent connection to the SQL server. |
|
_disconnect ( ) |
Disconnects from the SQL server and cleans up the connection. |
|
Описание методов
__construct()
публичный Метод
Constructs a new SQL storage object.
_connect()
защищенный Метод
Attempts to open a persistent connection to the SQL server.
_disconnect()
защищенный Метод
Disconnects from the SQL server and cleans up the connection.
getPaste()
публичный Метод
Retrieves the paste from the database.
getPastes()
публичный Метод
public getPastes ( $bin, $limit = null, $start = null ) |
savePaste()
публичный Метод
public savePaste ( $bin, $paste, $syntax = 'none', $title = '' ) |
Описание свойств
$_connected защищенное свойство
Boolean indicating whether or not we're connected to the SQL server.
protected bool $_connected |
Результат |
boolean |
|
Handle for the current database connection.
protected DB $_db |
Результат |
DB |
|
$_params защищенное свойство
Hash containing connection parameters.
protected array $_params |
Результат |
array |
|
$_write_db защищенное свойство
Handle for the current database connection, used for writing. Defaults
to the same handle as $_db if a separate write database is not required.
protected DB $_write_db |
Результат |
DB |
|