PHPLinq_Adapter_Abstract

category PHPLinq
package PHPLinq_Adapter
copyright Copyright (c) 2008 - 2009 PHPLinq (http://www.codeplex.com/PHPLinq)

 Methods

Constructor

__construct(\Zend_Db_Adapter_Abstract $adapter) 

Parameters

$adapter

\Zend_Db_Adapter_Abstract

Absolute value

abs(mixed $number) : string

Parameters

$number

mixed

Returns

string

Quote string with slashes

addslashes(string $str) : string

Parameters

$str

string

Returns

string

Return a specific character

chr(string $string) : string

Parameters

$string

string

The ascii code

Returns

string

Count elements in an array, or properties in an object

count(mixed $var) : string

Parameters

$var

mixed

Returns

string

Execute a custom function (outside of PHPLinq_Adapter package).

custom() 

Get list of functions

getFunctions() : \array;
Static

Returns

\array;

Make a string's first character lowercase

lcfirst(string $str) : string

Parameters

$str

string

Returns

string

Strip whitespace (or other characters) from the beginning of a string

ltrim(string $str) : string

Parameters

$str

string

Returns

string

Find highest value

max(mixed $values) : string

Parameters

$values

mixed

Returns

string

Calculate the md5 hash of a string

md5(string $str, boolean $raw_output) : string

Parameters

$str

string

$raw_output

boolean

Returns

string

Find lowest value

min(mixed $values) : string

Parameters

$values

mixed

Returns

string

Convert operand

operand(string $operand) : string

Parameters

$operand

string

Returns

string

Convert operator

operator(string $operator) : string

Parameters

$operator

string

Returns

string

Return ASCII value of character

ord(string $string) : string

Parameters

$string

string

A character

Returns

string

Safely quotes a value for an SQL statement.

quote(mixed $value, mixed $type) : mixed

If an array is passed as the value, the array values are quoted and then returned as a comma-separated string.

Parameters

$value

mixed

The value to quote.

$type

mixed

OPTIONAL the SQL datatype name, or constant, or null.

Returns

mixedAn SQL-safe quoted value (or string of separated values).

Quotes an identifier.

quoteIdentifier(string | array | \Zend_Db_Expr $ident, boolean $auto) : string

Accepts a string representing a qualified indentifier. For Example:

$adapter->quoteIdentifier('myschema.mytable')

Returns: "myschema"."mytable"

Or, an array of one or more identifiers that may form a qualified identifier:

$adapter->quoteIdentifier(array('myschema','my.table'))

Returns: "myschema"."my.table"

The actual quote character surrounding the identifiers may vary depending on the adapter.

Parameters

$ident

stringarray\Zend_Db_Expr

The identifier.

$auto

boolean

If true, heed the AUTO_QUOTE_IDENTIFIERS config option.

Returns

stringThe quoted identifier.

Generate a random integer

rand() : string

Returns

string

Rounds a float

round(float $val, int $precision) : string

Parameters

$val

float

$precision

int

Returns

string

Strip whitespace (or other characters) from the end of a string

rtrim(string $str) : string

Parameters

$str

string

Returns

string

Calculate the sha1 hash of a string

sha1(string $str, boolean $raw_output) : string

Parameters

$str

string

$raw_output

boolean

Returns

string

Calculate the soundex key of a string

soundex(string $str) : string

Parameters

$str

string

Returns

string

Repeat a string

str_repeat(string $input, int $multiplier) : string

Parameters

$input

string

$multiplier

int

Returns

string

Replace all occurrences of the search string with the replacement string

str_replace(mixed $search, mixed $replace, mixed $subject) : string

Parameters

$search

mixed

$replace

mixed

$subject

mixed

Returns

string

Find position of first occurrence of a case-insensitive string

stripos(string $haystack, mixed $needle, int $offset) : string

Parameters

$haystack

string

$needle

mixed

$offset

int

Returns

string

Get string length

strlen(string $string) : string

Parameters

$string

string

Returns

string

Find position of first occurrence of a string

strpos(string $haystack, mixed $needle, int $offset) : string

Parameters

$haystack

string

$needle

mixed

$offset

int

Returns

string

Make a string lowercase

strtolower(string $str) : string

Parameters

$str

string

Returns

string

Make a string uppercase

strtoupper(string $str) : string

Parameters

$str

string

Returns

string

Return part of a string

substr(string $string, int $start, int $length) : string

Parameters

$string

string

$start

int

$length

int

Returns

string

Strip whitespace (or other characters) from the beginning and end of a string

trim(string $str) : string

Parameters

$str

string

Returns

string

Make a string's first character uppercase

ucfirst(string $str) : string

Parameters

$str

string

Returns

string

 Properties

 

$_adapter : \Zend_Db_Adapter_Abstract
 

$_functions : array