forked from doctrine/doctrine1
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
768 changed files
with
1,548 additions
and
5,778 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,12 +22,7 @@ | |
/** | ||
* Provides array access and property overload interface for Doctrine subclasses. | ||
* | ||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL | ||
* | ||
* @see www.doctrine-project.org | ||
* @since 1.0 | ||
* | ||
* @version $Revision: 7490 $ | ||
* | ||
* @author Konsta Vesterinen <[email protected]> | ||
*/ | ||
|
@@ -36,8 +31,7 @@ abstract class Doctrine_Access extends Doctrine_Locator_Injectable implements Ar | |
/** | ||
* Set an entire aray to the data. | ||
* | ||
* @param array $array An array of key => value pairs | ||
* | ||
* @param array $array An array of key => value pairs | ||
* @return Doctrine_Access | ||
*/ | ||
public function setArray(array $array) | ||
|
@@ -72,9 +66,8 @@ public function __get($name) | |
/** | ||
* Check if key exists in data. | ||
* | ||
* @param string $name | ||
* | ||
* @return bool whether or not this object contains $name | ||
* @param string $name | ||
* @return bool whether or not this object contains $name | ||
*/ | ||
public function __isset($name) | ||
{ | ||
|
@@ -133,9 +126,8 @@ public function offsetUnset($offset) | |
/** | ||
* Remove the element with the specified offset. | ||
* | ||
* @param mixed $offset The offset to remove | ||
* | ||
* @return bool True if removed otherwise false | ||
* @param mixed $offset The offset to remove | ||
* @return bool True if removed otherwise false | ||
*/ | ||
public function remove($offset) | ||
{ | ||
|
@@ -166,9 +158,8 @@ public function set($offset, $value) | |
/** | ||
* Check if the specified offset exists. | ||
* | ||
* @param mixed $offset The offset to check | ||
* | ||
* @return bool True if exists otherwise false | ||
* @param mixed $offset The offset to check | ||
* @return bool True if exists otherwise false | ||
*/ | ||
public function contains($offset) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,12 +22,7 @@ | |
/** | ||
* Doctrine_Adapter exception class. | ||
* | ||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL | ||
* | ||
* @see www.doctrine-project.org | ||
* @since 1.0 | ||
* | ||
* @version $Revision$ | ||
* | ||
* @author Konsta Vesterinen <[email protected]> | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,12 +23,8 @@ | |
* This adapter interface should be implemented by all custom adapters. | ||
* | ||
* @author Konsta Vesterinen <[email protected]> | ||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL | ||
* | ||
* @see www.doctrine-project.org | ||
* @since 1.0 | ||
* | ||
* @version $Revision: 7490 $ | ||
*/ | ||
interface Doctrine_Adapter_Interface | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,12 +23,8 @@ | |
* Doctrine mock connection adapter. This class is used for special testing purposes. | ||
* | ||
* @author Konsta Vesterinen <[email protected]> | ||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL | ||
* | ||
* @see www.doctrine-project.org | ||
* @since 1.0 | ||
* | ||
* @version $Revision: 7490 $ | ||
*/ | ||
class Doctrine_Adapter_Mock implements Doctrine_Adapter_Interface, Countable | ||
{ | ||
|
@@ -109,8 +105,7 @@ public function forceException($name, $message = '', $code = 0) | |
/** | ||
* Prepare a query statement. | ||
* | ||
* @param string $query Query to prepare | ||
* | ||
* @param string $query Query to prepare | ||
* @return Doctrine_Adapter_Statement_Mock $mock Mock prepared statement | ||
*/ | ||
public function prepare($query) | ||
|
@@ -134,8 +129,7 @@ public function addQuery($query) | |
/** | ||
* Fake the execution of query and add it to the stack of executed queries. | ||
* | ||
* @param string $query | ||
* | ||
* @param string $query | ||
* @return Doctrine_Adapter_Statement_Mock $stmt | ||
*/ | ||
public function query($query) | ||
|
@@ -171,8 +165,7 @@ public function getAll() | |
/** | ||
* Quote a value for the dbms. | ||
* | ||
* @param string $input | ||
* | ||
* @param string $input | ||
* @return string $quoted | ||
*/ | ||
public function quote($input) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,12 +25,8 @@ | |
* @author Konsta Vesterinen <[email protected]> | ||
* @author vadik56 | ||
* @author Miloslav Kmet <[email protected]> | ||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL | ||
* | ||
* @see www.doctrine-project.org | ||
* @since 1.0 | ||
* | ||
* @version $Revision$ | ||
*/ | ||
class Doctrine_Adapter_Oracle implements Doctrine_Adapter_Interface | ||
{ | ||
|
@@ -142,8 +138,7 @@ public function __construct($config = array(), $username = null, $password = nul | |
/** | ||
* Prepare a query statement. | ||
* | ||
* @param string $query Query to prepare | ||
* | ||
* @param string $query Query to prepare | ||
* @return Doctrine_Adapter_Statement_Oracle $stmt prepared statement | ||
*/ | ||
public function prepare($query) | ||
|
@@ -154,8 +149,7 @@ public function prepare($query) | |
/** | ||
* Execute query and return results as statement object. | ||
* | ||
* @param string $query | ||
* | ||
* @param string $query | ||
* @return Doctrine_Adapter_Statement_Oracle $stmt | ||
*/ | ||
public function query($query) | ||
|
@@ -169,8 +163,7 @@ public function query($query) | |
/** | ||
* Quote a value for the dbms. | ||
* | ||
* @param string $input | ||
* | ||
* @param string $input | ||
* @return string $quoted | ||
*/ | ||
public function quote($input) | ||
|
@@ -234,10 +227,9 @@ public function rollBack() | |
/** | ||
* Set connection attribute. | ||
* | ||
* @param int $attribute | ||
* @param mixed $value the value of given attribute | ||
* | ||
* @return bool returns TRUE on success or FALSE on failure | ||
* @param int $attribute | ||
* @param mixed $value the value of given attribute | ||
* @return bool returns TRUE on success or FALSE on failure | ||
*/ | ||
public function setAttribute($attribute, $value) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,12 +23,8 @@ | |
* Doctrine_Adapter_Statement. | ||
* | ||
* @author Konsta Vesterinen <[email protected]> | ||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL | ||
* | ||
* @see www.doctrine-project.org | ||
* @since 1.0 | ||
* | ||
* @version $Revision: 7490 $ | ||
*/ | ||
abstract class Doctrine_Adapter_Statement | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,39 +23,33 @@ | |
* Interface for Doctrine adapter statements. | ||
* | ||
* @author Konsta Vesterinen <[email protected]> | ||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL | ||
* | ||
* @see www.doctrine-project.org | ||
* @since 1.0 | ||
* | ||
* @version $Revision: 7490 $ | ||
*/ | ||
interface Doctrine_Adapter_Statement_Interface | ||
{ | ||
/** | ||
* Bind a column to a PHP variable. | ||
* | ||
* @param mixed $column Number of the column (1-indexed) or name of the column in the result set. | ||
* If using the column name, be aware that the name should match | ||
* the case of the column, as returned by the driver. | ||
* @param string $param name of the PHP variable to which the column will be bound | ||
* @param int $type data type of the parameter, specified by the Doctrine_Core::PARAM_* constants | ||
* | ||
* @return bool Returns TRUE on success or FALSE on failure | ||
* @param mixed $column Number of the column (1-indexed) or name of the column in the result set. | ||
* If using the column name, be aware that the name should match | ||
* the case of the column, as returned by the driver. | ||
* @param string $param name of the PHP variable to which the column will be bound | ||
* @param int $type data type of the parameter, specified by the Doctrine_Core::PARAM_* constants | ||
* @return bool Returns TRUE on success or FALSE on failure | ||
*/ | ||
public function bindColumn($column, $param, $type = null); | ||
|
||
/** | ||
* Binds a value to a corresponding named or question mark | ||
* placeholder in the SQL statement that was use to prepare the statement. | ||
* | ||
* @param mixed $param Parameter identifier. For a prepared statement using named placeholders, | ||
* this will be a parameter name of the form :name. For a prepared statement | ||
* using question mark placeholders, this will be the 1-indexed position of the parameter | ||
* @param mixed $value the value to bind to the parameter | ||
* @param int $type explicit data type for the parameter using the Doctrine_Core::PARAM_* constants | ||
* | ||
* @return bool returns TRUE on success or FALSE on failure | ||
* @param mixed $param Parameter identifier. For a prepared statement using named placeholders, | ||
* this will be a parameter name of the form :name. For a prepared statement | ||
* using question mark placeholders, this will be the 1-indexed position of the parameter | ||
* @param mixed $value the value to bind to the parameter | ||
* @param int $type explicit data type for the parameter using the Doctrine_Core::PARAM_* constants | ||
* @return bool returns TRUE on success or FALSE on failure | ||
*/ | ||
public function bindValue($param, $value, $type = null); | ||
|
||
|
@@ -70,14 +64,13 @@ public function bindValue($param, $value, $type = null); | |
* of stored procedures that return data as output parameters, and some also as input/output | ||
* parameters that both send in data and are updated to receive it. | ||
* | ||
* @param mixed $variable name of the PHP variable to bind to the SQL statement parameter | ||
* @param int $type Explicit data type for the parameter using the Doctrine_Core::PARAM_* constants. To return | ||
* an INOUT parameter from a stored procedure, use the bitwise OR operator to set the | ||
* Doctrine_Core::PARAM_INPUT_OUTPUT bits for the data_type parameter. | ||
* @param int $length Length of the data type. To indicate that a parameter is an OUT parameter | ||
* from a stored procedure, you must explicitly set the length. | ||
* | ||
* @return bool returns TRUE on success or FALSE on failure | ||
* @param mixed $variable name of the PHP variable to bind to the SQL statement parameter | ||
* @param int $type Explicit data type for the parameter using the Doctrine_Core::PARAM_* constants. To return | ||
* an INOUT parameter from a stored procedure, use the bitwise OR operator to set the | ||
* Doctrine_Core::PARAM_INPUT_OUTPUT bits for the data_type parameter. | ||
* @param int $length Length of the data type. To indicate that a parameter is an OUT parameter | ||
* from a stored procedure, you must explicitly set the length. | ||
* @return bool returns TRUE on success or FALSE on failure | ||
*/ | ||
public function bindParam($column, &$variable, $type = null, $length = null, $driverOptions = array()); | ||
|
||
|
@@ -124,10 +117,9 @@ public function errorInfo(); | |
* if any, of their associated parameter markers or pass an array of input-only | ||
* parameter values | ||
* | ||
* @param array $params an array of values with as many elements as there are | ||
* bound parameters in the SQL statement being executed | ||
* | ||
* @return bool returns TRUE on success or FALSE on failure | ||
* @param array $params an array of values with as many elements as there are | ||
* bound parameters in the SQL statement being executed | ||
* @return bool returns TRUE on success or FALSE on failure | ||
*/ | ||
public function execute($params = null); | ||
|
||
|
@@ -164,10 +156,9 @@ public function fetch( | |
/** | ||
* Returns an array containing all of the result set rows. | ||
* | ||
* @param int $fetchStyle Controls how the next row will be returned to the caller. | ||
* This value must be one of the Doctrine_Core::FETCH_* constants, | ||
* defaulting to Doctrine_Core::FETCH_BOTH | ||
* | ||
* @param int $fetchStyle Controls how the next row will be returned to the caller. | ||
* This value must be one of the Doctrine_Core::FETCH_* constants, | ||
* defaulting to Doctrine_Core::FETCH_BOTH | ||
* @return array | ||
*/ | ||
public function fetchAll($fetchStyle = Doctrine_Core::FETCH_BOTH); | ||
|
@@ -176,10 +167,9 @@ public function fetchAll($fetchStyle = Doctrine_Core::FETCH_BOTH); | |
* Returns a single column from the next row of a | ||
* result set or FALSE if there are no more rows. | ||
* | ||
* @param int $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no | ||
* value is supplied, Doctrine_Adapter_Statement_Interface->fetchColumn() | ||
* fetches the first column. | ||
* | ||
* @param int $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no | ||
* value is supplied, Doctrine_Adapter_Statement_Interface->fetchColumn() | ||
* fetches the first column. | ||
* @return string returns a single column in the next row of a result set | ||
*/ | ||
public function fetchColumn($columnIndex = 0); | ||
|
@@ -190,11 +180,10 @@ public function fetchColumn($columnIndex = 0); | |
* Fetches the next row and returns it as an object. This function is an alternative to | ||
* Doctrine_Adapter_Statement_Interface->fetch() with Doctrine_Core::FETCH_CLASS or Doctrine_Core::FETCH_OBJ style. | ||
* | ||
* @param string $className name of the created class, defaults to stdClass | ||
* @param array $args elements of this array are passed to the constructor | ||
* | ||
* @return mixed an instance of the required class with property names that correspond | ||
* to the column names or FALSE in case of an error | ||
* @param string $className name of the created class, defaults to stdClass | ||
* @param array $args elements of this array are passed to the constructor | ||
* @return mixed an instance of the required class with property names that correspond | ||
* to the column names or FALSE in case of an error | ||
*/ | ||
public function fetchObject($className = 'stdClass', $args = array()); | ||
|
||
|
@@ -212,8 +201,7 @@ public function getAttribute($attribute); | |
/** | ||
* Returns metadata for a column in a result set. | ||
* | ||
* @param int $column the 0-indexed column in the result set | ||
* | ||
* @param int $column the 0-indexed column in the result set | ||
* @return array Associative meta data array with the following structure: | ||
* | ||
* native_type The PHP native type used to represent the column value. | ||
|
@@ -254,21 +242,19 @@ public function rowCount(); | |
/** | ||
* Set a statement attribute. | ||
* | ||
* @param int $attribute | ||
* @param mixed $value the value of given attribute | ||
* | ||
* @return bool returns TRUE on success or FALSE on failure | ||
* @param int $attribute | ||
* @param mixed $value the value of given attribute | ||
* @return bool returns TRUE on success or FALSE on failure | ||
*/ | ||
public function setAttribute($attribute, $value); | ||
|
||
/** | ||
* Set the default fetch mode for this statement. | ||
* | ||
* @param int $mode the fetch mode must be one of the Doctrine_Core::FETCH_* constants | ||
* @param mixed|null $arg1 | ||
* @param mixed|null $arg2 | ||
* | ||
* @return bool returns 1 on success or FALSE on failure | ||
* @param int $mode the fetch mode must be one of the Doctrine_Core::FETCH_* constants | ||
* @param mixed|null $arg1 | ||
* @param mixed|null $arg2 | ||
* @return bool returns 1 on success or FALSE on failure | ||
*/ | ||
public function setFetchMode($mode, $arg1 = null, $arg2 = null); | ||
} |
Oops, something went wrong.