diff --git a/library/Zend/Db/Adapter/AdapterAwareInterface.php b/library/Zend/Db/Adapter/AdapterAwareInterface.php index 3f948876709..7d4e63c6737 100644 --- a/library/Zend/Db/Adapter/AdapterAwareInterface.php +++ b/library/Zend/Db/Adapter/AdapterAwareInterface.php @@ -17,5 +17,11 @@ */ interface AdapterAwareInterface { + /** + * Set db adapter + * + * @param Adapter $adapter + * @return AdapterAwareInterface + */ public function setDbAdapter(Adapter $adapter); } diff --git a/library/Zend/Db/Adapter/AdapterServiceFactory.php b/library/Zend/Db/Adapter/AdapterServiceFactory.php index 492a8df53c8..2ddc0cc5121 100644 --- a/library/Zend/Db/Adapter/AdapterServiceFactory.php +++ b/library/Zend/Db/Adapter/AdapterServiceFactory.php @@ -20,6 +20,12 @@ */ class AdapterServiceFactory implements FactoryInterface { + /** + * Create db adapter service + * + * @param ServiceLocatorInterface $serviceLocator + * @return Adapter + */ public function createService(ServiceLocatorInterface $serviceLocator) { $config = $serviceLocator->get('Configuration'); diff --git a/library/Zend/Db/Adapter/Driver/ConnectionInterface.php b/library/Zend/Db/Adapter/Driver/ConnectionInterface.php index 6c7f967a581..b6acd91d24e 100644 --- a/library/Zend/Db/Adapter/Driver/ConnectionInterface.php +++ b/library/Zend/Db/Adapter/Driver/ConnectionInterface.php @@ -17,14 +17,75 @@ */ interface ConnectionInterface { + /** + * Get current schema + * + * @return string + */ public function getCurrentSchema(); + + /** + * Get resource + * + * @return mixed + */ public function getResource(); + + /** + * Connect + * + * @return ConnectionInterface + */ public function connect(); + + /** + * Is connected + * + * @return bool + */ public function isConnected(); + + /** + * Disconnect + * + * @return ConnectionInterface + */ public function disconnect(); + + /** + * Begin transaction + * + * @return ConnectionInterface + */ public function beginTransaction(); + + /** + * Commit + * + * @return ConnectionInterface + */ public function commit(); + + /** + * Rollback + * + * @return ConnectionInterface + */ public function rollback(); - public function execute($sql); // return result set + + /** + * Execute + * + * @param string $sql + * @return ResultInterface + */ + public function execute($sql); + + /** + * Get last generated id + * + * @param null $name Ignored + * @return integer + */ public function getLastGeneratedValue($name = null); } diff --git a/library/Zend/Db/Adapter/Driver/DriverInterface.php b/library/Zend/Db/Adapter/Driver/DriverInterface.php index c99ef8d9208..6da579647d2 100644 --- a/library/Zend/Db/Adapter/Driver/DriverInterface.php +++ b/library/Zend/Db/Adapter/Driver/DriverInterface.php @@ -23,39 +23,53 @@ interface DriverInterface const NAME_FORMAT_NATURAL = 'natural'; /** + * Get database platform name + * * @param string $nameFormat * @return string */ public function getDatabasePlatformName($nameFormat = self::NAME_FORMAT_CAMELCASE); /** + * Check environment + * * @return bool */ public function checkEnvironment(); /** + * Get connection + * * @return ConnectionInterface */ public function getConnection(); /** + * Create statement + * * @param string|resource $sqlOrResource * @return StatementInterface */ public function createStatement($sqlOrResource = null); /** + * Create result + * * @param resource $resource * @return ResultInterface */ public function createResult($resource); /** + * Get prepare type + * * @return array */ public function getPrepareType(); /** + * Format parameter name + * * @param string $name * @param mixed $type * @return string @@ -63,6 +77,8 @@ public function getPrepareType(); public function formatParameterName($name, $type = null); /** + * Get last generated value + * * @return mixed */ public function getLastGeneratedValue(); diff --git a/library/Zend/Db/Adapter/Driver/Feature/AbstractFeature.php b/library/Zend/Db/Adapter/Driver/Feature/AbstractFeature.php index 9ec00ffc318..ac6c506cb6d 100644 --- a/library/Zend/Db/Adapter/Driver/Feature/AbstractFeature.php +++ b/library/Zend/Db/Adapter/Driver/Feature/AbstractFeature.php @@ -26,13 +26,21 @@ abstract class AbstractFeature protected $driver = null; /** + * Set driver + * * @param DriverInterface $driver + * @return void */ public function setDriver(DriverInterface $driver) { $this->driver = $driver; } + /** + * Get name + * + * @return string + */ abstract public function getName(); } diff --git a/library/Zend/Db/Adapter/Driver/Feature/DriverFeatureInterface.php b/library/Zend/Db/Adapter/Driver/Feature/DriverFeatureInterface.php index 0c9be962577..39d185c66b5 100644 --- a/library/Zend/Db/Adapter/Driver/Feature/DriverFeatureInterface.php +++ b/library/Zend/Db/Adapter/Driver/Feature/DriverFeatureInterface.php @@ -17,7 +17,27 @@ */ interface DriverFeatureInterface { + /** + * Setup the default features for Pdo + * + * @return DriverFeatureInterface + */ public function setupDefaultFeatures(); + + /** + * Add feature + * + * @param string $name + * @param mixed $feature + * @return DriverFeatureInterface + */ public function addFeature($name, $feature); + + /** + * Get feature + * + * @param $name + * @return mixed|false + */ public function getFeature($name); } diff --git a/library/Zend/Db/Adapter/Driver/Mysqli/Connection.php b/library/Zend/Db/Adapter/Driver/Mysqli/Connection.php index 9cb2e24a9c8..a3c19cd8334 100644 --- a/library/Zend/Db/Adapter/Driver/Mysqli/Connection.php +++ b/library/Zend/Db/Adapter/Driver/Mysqli/Connection.php @@ -138,7 +138,7 @@ public function getResource() * Connect * * @throws Exception\RuntimeException - * @return null + * @return void */ public function connect() { @@ -156,7 +156,7 @@ public function connect() return $p[$name]; } } - return null; + return; }; $hostname = $findParameterValue(array('hostname', 'host')); @@ -185,7 +185,7 @@ public function connect() /** * Is connected * - * @return boolean + * @return bool */ public function isConnected() { @@ -194,6 +194,8 @@ public function isConnected() /** * Disconnect + * + * @return void */ public function disconnect() { @@ -205,6 +207,8 @@ public function disconnect() /** * Begin transaction + * + * @return void */ public function beginTransaction() { @@ -218,6 +222,8 @@ public function beginTransaction() /** * Commit + * + * @return void */ public function commit() { diff --git a/library/Zend/Db/Adapter/Driver/Mysqli/Mysqli.php b/library/Zend/Db/Adapter/Driver/Mysqli/Mysqli.php index 5af8020ae40..e86a3c05743 100644 --- a/library/Zend/Db/Adapter/Driver/Mysqli/Mysqli.php +++ b/library/Zend/Db/Adapter/Driver/Mysqli/Mysqli.php @@ -45,6 +45,8 @@ class Mysqli implements DriverInterface ); /** + * Constructor + * * @param array|Connection|\mysqli $connection * @param null|Statement $statementPrototype * @param null|Result $resultPrototype @@ -88,6 +90,8 @@ public function registerStatementPrototype(Statement $statementPrototype) } /** + * Get statement prototype + * * @return null|Statement */ public function getStatementPrototype() @@ -130,6 +134,9 @@ public function getDatabasePlatformName($nameFormat = self::NAME_FORMAT_CAMELCAS /** * Check environment + * + * @throws Exception\RuntimeException + * @return void */ public function checkEnvironment() { @@ -139,6 +146,8 @@ public function checkEnvironment() } /** + * Get connection + * * @return Connection */ public function getConnection() @@ -147,6 +156,8 @@ public function getConnection() } /** + * Create statement + * * @param string $sqlOrResource * @return Statement */ @@ -175,6 +186,8 @@ public function createStatement($sqlOrResource = null) } /** + * Create result + * * @param resource $resource * @param null|bool $isBuffered * @return Result @@ -187,6 +200,8 @@ public function createResult($resource, $isBuffered = null) } /** + * Get prepare type + * * @return array */ public function getPrepareType() @@ -195,6 +210,8 @@ public function getPrepareType() } /** + * Format parameter name + * * @param string $name * @param mixed $type * @return string @@ -205,6 +222,8 @@ public function formatParameterName($name, $type = null) } /** + * Get last generated value + * * @return mixed */ public function getLastGeneratedValue() diff --git a/library/Zend/Db/Adapter/Driver/Mysqli/Result.php b/library/Zend/Db/Adapter/Driver/Mysqli/Result.php index ab81db1f442..8f17a65ffe6 100644 --- a/library/Zend/Db/Adapter/Driver/Mysqli/Result.php +++ b/library/Zend/Db/Adapter/Driver/Mysqli/Result.php @@ -10,6 +10,7 @@ namespace Zend\Db\Adapter\Driver\Mysqli; +use Iterator; use Zend\Db\Adapter\Driver\ResultInterface; use Zend\Db\Adapter\Exception; @@ -18,7 +19,9 @@ * @package Zend_Db * @subpackage Adapter */ -class Result implements \Iterator, ResultInterface +class Result implements + Iterator, + ResultInterface { /** @@ -101,6 +104,7 @@ public function initialize($resource, $generatedValue, $isBuffered = null) /** * Force buffering + * * @throws Exception\RuntimeException */ public function buffer() @@ -115,6 +119,8 @@ public function buffer() } /** + * Check if is buffered + * * @return bool|null */ public function isBuffered() @@ -124,6 +130,7 @@ public function isBuffered() /** * Return the resource + * * @return mixed */ public function getResource() @@ -143,6 +150,7 @@ public function isQueryResult() /** * Get affected rows + * * @return integer */ public function getAffectedRows() @@ -156,6 +164,7 @@ public function getAffectedRows() /** * Current + * * @return mixed */ public function current() @@ -243,6 +252,8 @@ protected function loadFromMysqliResult() /** * Next + * + * @return void */ public function next() { @@ -257,6 +268,7 @@ public function next() /** * Key + * * @return mixed */ public function key() @@ -266,6 +278,8 @@ public function key() /** * Rewind + * + * @return void */ public function rewind() { @@ -281,6 +295,7 @@ public function rewind() /** * Valid + * * @return boolean */ public function valid() @@ -311,7 +326,9 @@ public function count() } /** - * @return int + * Get field count + * + * @return integer */ public function getFieldCount() { @@ -319,6 +336,8 @@ public function getFieldCount() } /** + * Get generated value + * * @return mixed|null */ public function getGeneratedValue() diff --git a/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php b/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php index 14236c63e7f..59caf229048 100644 --- a/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php +++ b/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php @@ -151,6 +151,8 @@ public function getSql() } /** + * Get parameter count + * * @return ParameterContainer */ public function getParameterContainer() @@ -159,6 +161,8 @@ public function getParameterContainer() } /** + * Is prepared + * * @return bool */ public function isPrepared() @@ -167,6 +171,8 @@ public function isPrepared() } /** + * Prepare + * * @param string $sql * @throws Exception\InvalidQueryException * @throws Exception\RuntimeException @@ -243,6 +249,8 @@ public function execute($parameters = null) /** * Bind parameters from container + * + * @return void */ protected function bindParametersFromContainer() { diff --git a/library/Zend/Db/Adapter/Driver/Pdo/Connection.php b/library/Zend/Db/Adapter/Driver/Pdo/Connection.php index 76019a182bb..33f0ba0fcab 100644 --- a/library/Zend/Db/Adapter/Driver/Pdo/Connection.php +++ b/library/Zend/Db/Adapter/Driver/Pdo/Connection.php @@ -47,8 +47,10 @@ class Connection implements ConnectionInterface protected $inTransaction = false; /** + * Constructor + * * @param array|\PDO|null $connectionParameters - * @throws \Zend\Db\Adapter\Exception\InvalidArgumentException + * @throws Exception\InvalidArgumentException */ public function __construct($connectionParameters = null) { @@ -62,6 +64,8 @@ public function __construct($connectionParameters = null) } /** + * Set driver + * * @param Pdo $driver * @return Connection */ @@ -72,6 +76,8 @@ public function setDriver(Pdo $driver) } /** + * Get driver name + * * @return null|string */ public function getDriverName() @@ -80,7 +86,10 @@ public function getDriverName() } /** + * Set connection parameters + * * @param array $connectionParameters + * @return void */ public function setConnectionParameters(array $connectionParameters) { @@ -100,6 +109,8 @@ public function setConnectionParameters(array $connectionParameters) } /** + * Get connection parameters + * * @return array */ public function getConnectionParameters() @@ -152,6 +163,8 @@ public function setResource(\PDO $resource) } /** + * Get resource + * * @return \PDO */ public function getResource() @@ -160,8 +173,11 @@ public function getResource() } /** + * Connect + * * @return Connection - * @throws \Exception + * @throws Exception\InvalidConnectionParametersException + * @throws Exception\RuntimeException */ public function connect() { @@ -247,6 +263,8 @@ public function connect() } /** + * Is connected + * * @return bool */ public function isConnected() @@ -255,6 +273,8 @@ public function isConnected() } /** + * Disconnect + * * @return Connection */ public function disconnect() @@ -266,6 +286,8 @@ public function disconnect() } /** + * Begin transaction + * * @return Connection */ public function beginTransaction() @@ -279,6 +301,8 @@ public function beginTransaction() } /** + * Commit + * * @return Connection */ public function commit() @@ -293,6 +317,8 @@ public function commit() } /** + * Rollback + * * @return Connection * @throws Exception\RuntimeException */ @@ -311,9 +337,11 @@ public function rollback() } /** + * Execute + * * @param $sql * @return Result - * @throws \Zend\Db\Adapter\Exception\InvalidQueryException + * @throws Exception\InvalidQueryException */ public function execute($sql) { @@ -334,6 +362,8 @@ public function execute($sql) } /** + * Prepare + * * @param string $sql * @return Statement */ diff --git a/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php b/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php index 72d68f7eaaa..7b536c643c7 100644 --- a/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php +++ b/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php @@ -109,6 +109,8 @@ public function registerResultPrototype(Result $resultPrototype) } /** + * Add feature + * * @param string $name * @param AbstractFeature $feature * @return Pdo @@ -124,7 +126,9 @@ public function addFeature($name, $feature) } /** - * setup the default features for Pdo + * Setup the default features for Pdo + * + * @return Pdo */ public function setupDefaultFeatures() { @@ -135,6 +139,8 @@ public function setupDefaultFeatures() } /** + * Get feature + * * @param $name * @return AbstractFeature|false */ diff --git a/library/Zend/Db/Adapter/Driver/Pgsql/Connection.php b/library/Zend/Db/Adapter/Driver/Pgsql/Connection.php index a48e79f376d..a734d707350 100644 --- a/library/Zend/Db/Adapter/Driver/Pgsql/Connection.php +++ b/library/Zend/Db/Adapter/Driver/Pgsql/Connection.php @@ -60,6 +60,8 @@ public function __construct($connectionInfo = null) } /** + * Set connection parameters + * * @param array $connectionParameters * @return Connection */ @@ -70,6 +72,8 @@ public function setConnectionParameters(array $connectionParameters) } /** + * Set driver + * * @param Pgsql $driver * @return Connection */ @@ -80,6 +84,8 @@ public function setDriver(Pgsql $driver) } /** + * Set resource + * * @param resource $resource * @return Connection */ @@ -90,7 +96,9 @@ public function setResource($resource) } /** - * @return null + * Get current schema + * + * @return null|string */ public function getCurrentSchema() { @@ -106,6 +114,8 @@ public function getCurrentSchema() } /** + * Get resource + * * @return resource */ public function getResource() diff --git a/library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php b/library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php index 50bc1304bfb..6fd42af56bf 100644 --- a/library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php +++ b/library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php @@ -43,6 +43,8 @@ class Pgsql implements DriverInterface ); /** + * Constructor + * * @param array|Connection|resource $connection * @param null|Statement $statementPrototype * @param null|Result $resultPrototype @@ -60,6 +62,8 @@ public function __construct($connection, Statement $statementPrototype = null, R } /** + * Register connection + * * @param Connection $connection * @return Pgsql */ @@ -71,6 +75,8 @@ public function registerConnection(Connection $connection) } /** + * Register statement prototype + * * @param Statement $statement * @return Pgsql */ @@ -82,6 +88,8 @@ public function registerStatementPrototype(Statement $statement) } /** + * Register result prototype + * * @param Result $result * @return Pgsql */ @@ -92,6 +100,8 @@ public function registerResultPrototype(Result $result) } /** + * Get database platform name + * * @param string $nameFormat * @return string */ @@ -105,6 +115,8 @@ public function getDatabasePlatformName($nameFormat = self::NAME_FORMAT_CAMELCAS } /** + * Check environment + * * @throws Exception\RuntimeException * @return bool */ @@ -116,6 +128,8 @@ public function checkEnvironment() } /** + * Get connection + * * @return Connection */ public function getConnection() @@ -124,6 +138,8 @@ public function getConnection() } /** + * Create statement + * * @param string|null $sqlOrResource * @return Statement */ @@ -150,6 +166,8 @@ public function createStatement($sqlOrResource = null) } /** + * Create result + * * @param resource $resource * @return Result */ @@ -161,6 +179,8 @@ public function createResult($resource) } /** + * Get prepare Type + * * @return array */ public function getPrepareType() @@ -169,6 +189,8 @@ public function getPrepareType() } /** + * Format parameter name + * * @param string $name * @param mixed $type * @return string @@ -179,6 +201,8 @@ public function formatParameterName($name, $type = null) } /** + * Get last generated value + * * @return mixed */ public function getLastGeneratedValue() diff --git a/library/Zend/Db/Adapter/Driver/Pgsql/Result.php b/library/Zend/Db/Adapter/Driver/Pgsql/Result.php index f98544907e4..6a6f60c102d 100644 --- a/library/Zend/Db/Adapter/Driver/Pgsql/Result.php +++ b/library/Zend/Db/Adapter/Driver/Pgsql/Result.php @@ -11,6 +11,7 @@ namespace Zend\Db\Adapter\Driver\Pgsql; use Zend\Db\Adapter\Driver\ResultInterface; +use Zend\Db\Adapter\Exception; /** * @category Zend @@ -25,16 +26,33 @@ class Result implements ResultInterface */ protected $resource = null; + /** + * @var int + */ protected $position = 0; + /** + * @var int + */ protected $count = 0; + /** + * @var null|mixed + */ protected $generatedValue = null; + /** + * Initialize + * + * @param $resource + * @param $generatedValue + * @return void + * @throws Exception\InvalidArgumentException + */ public function initialize($resource, $generatedValue) { if (!is_resource($resource) || get_resource_type($resource) != 'pgsql result') { - throw new \Exception('Resource not of the correct type.'); + throw new Exception\InvalidArgumentException('Resource not of the correct type.'); } $this->resource = $resource; @@ -42,6 +60,11 @@ public function initialize($resource, $generatedValue) $this->generatedValue = $generatedValue; } + /** + * Current + * + * @return array|bool|mixed + */ public function current() { if ($this->count === 0) { @@ -50,57 +73,107 @@ public function current() return pg_fetch_assoc($this->resource, $this->position); } + /** + * Next + * + * @return void + */ public function next() { $this->position++; } + /** + * Key + * + * @return int|mixed + */ public function key() { return $this->position; } + /** + * Valid + * + * @return bool + */ public function valid() { return ($this->position < $this->count); } + /** + * Rewind + * + * @return void + */ public function rewind() { $this->position = 0; } + /** + * Buffer + * + * @return null + */ public function buffer() { return null; } + /** + * Is buffered + * + * @return false + */ public function isBuffered() { return false; } + /** + * Is query result + * + * @return bool + */ public function isQueryResult() { return (pg_num_fields($this->resource) > 0); } + /** + * Get affected rows + * + * @return int + */ public function getAffectedRows() { return pg_affected_rows($this->resource); } + /** + * Get generated value + * + * @return mixed|null + */ public function getGeneratedValue() { return $this->generatedValue; } + /** + * Get resource + */ public function getResource() { // TODO: Implement getResource() method. } /** + * Count + * * (PHP 5 >= 5.1.0)
* Count elements of an object * @link http://php.net/manual/en/countable.count.php @@ -114,6 +187,11 @@ public function count() return $this->count; } + /** + * Get field count + * + * @return int + */ public function getFieldCount() { return pg_num_fields($this->resource); diff --git a/library/Zend/Db/Adapter/Driver/Pgsql/Statement.php b/library/Zend/Db/Adapter/Driver/Pgsql/Statement.php index 2ff8e0b0196..6bef28dd29d 100644 --- a/library/Zend/Db/Adapter/Driver/Pgsql/Statement.php +++ b/library/Zend/Db/Adapter/Driver/Pgsql/Statement.php @@ -67,6 +67,8 @@ public function setDriver(Pgsql $driver) } /** + * Initialize + * * @param resource $pgsql * @return void * @throws Exception\RuntimeException for invalid or missing postgresql connection @@ -84,6 +86,8 @@ public function initialize($pgsql) } /** + * Get resource + * * @return resource */ public function getResource() @@ -92,6 +96,8 @@ public function getResource() } /** + * Set sql + * * @param string $sql * @return Statement */ @@ -102,6 +108,8 @@ public function setSql($sql) } /** + * Get sql + * * @return string */ public function getSql() @@ -110,6 +118,8 @@ public function getSql() } /** + * Set parameter container + * * @param ParameterContainer $parameterContainer * @return Statement */ @@ -120,6 +130,8 @@ public function setParameterContainer(ParameterContainer $parameterContainer) } /** + * Get parameter container + * * @return ParameterContainer */ public function getParameterContainer() @@ -128,6 +140,8 @@ public function getParameterContainer() } /** + * Prepare + * * @param string $sql */ public function prepare($sql = null) @@ -148,6 +162,8 @@ public function prepare($sql = null) } /** + * Is prepared + * * @return bool */ public function isPrepared() @@ -156,7 +172,9 @@ public function isPrepared() } /** - * @param null $parameters + * Execute + * + * @param ParameterContainer|null $parameters * @throws Exception\InvalidQueryException * @return Result */ diff --git a/library/Zend/Db/Adapter/Driver/ResultInterface.php b/library/Zend/Db/Adapter/Driver/ResultInterface.php index e180fc441bd..b338d9ae8c3 100644 --- a/library/Zend/Db/Adapter/Driver/ResultInterface.php +++ b/library/Zend/Db/Adapter/Driver/ResultInterface.php @@ -10,18 +10,64 @@ namespace Zend\Db\Adapter\Driver; +use Countable; +use Iterator; + /** * @category Zend * @package Zend_Db * @subpackage Adapter */ -interface ResultInterface extends \Countable, \Iterator +interface ResultInterface extends + Countable, + Iterator { + /** + * Force buffering + * + * @return void + */ public function buffer(); + + /** + * Check if is buffered + * + * @return bool|null + */ public function isBuffered(); + + /** + * Is query result? + * + * @return bool + */ public function isQueryResult(); + + /** + * Get affected rows + * + * @return integer + */ public function getAffectedRows(); + + /** + * Get generated value + * + * @return mixed|null + */ public function getGeneratedValue(); + + /** + * Get the resource + * + * @return mixed + */ public function getResource(); + + /** + * Get field count + * + * @return integer + */ public function getFieldCount(); } diff --git a/library/Zend/Db/Adapter/Driver/StatementInterface.php b/library/Zend/Db/Adapter/Driver/StatementInterface.php index e4d151ce513..63461ac89d9 100644 --- a/library/Zend/Db/Adapter/Driver/StatementInterface.php +++ b/library/Zend/Db/Adapter/Driver/StatementInterface.php @@ -22,24 +22,29 @@ interface StatementInterface extends StatementContainerInterface { /** + * Get resource + * * @return resource */ public function getResource(); /** - * @abstract + * Prepare sql + * * @param string $sql */ public function prepare($sql = null); /** - * @abstract + * Check if is prepared + * * @return bool */ public function isPrepared(); /** - * @abstract + * Execute + * * @param null $parameters * @return ResultInterface */ diff --git a/library/Zend/Db/Adapter/Platform/PlatformInterface.php b/library/Zend/Db/Adapter/Platform/PlatformInterface.php index 0b2851a07ba..fa5bd7b115e 100644 --- a/library/Zend/Db/Adapter/Platform/PlatformInterface.php +++ b/library/Zend/Db/Adapter/Platform/PlatformInterface.php @@ -17,13 +17,72 @@ */ interface PlatformInterface { + /** + * Get name + * + * @return string + */ public function getName(); + + /** + * Get quote identifier symbol + * + * @return string + */ public function getQuoteIdentifierSymbol(); + + /** + * Quote identifier + * + * @param string $identifier + * @return string + */ public function quoteIdentifier($identifier); + + /** + * Quote identifier chain + * + * @param string|string[] $identifierChain + * @return string + */ public function quoteIdentifierChain($identifierChain); + + /** + * Get quote value symbol + * + * @return string + */ public function getQuoteValueSymbol(); + + /** + * Quote value + * + * @param string $value + * @return string + */ public function quoteValue($value); + + /** + * Quote value list + * + * @param string|string[] $valueList + * @return string + */ public function quoteValueList($valueList); + + /** + * Get identifier separator + * + * @return string + */ public function getIdentifierSeparator(); + + /** + * Quote identifier in fragment + * + * @param string $identifier + * @param array $safeWords + * @return string + */ public function quoteIdentifierInFragment($identifier, array $additionalSafeWords = array()); } diff --git a/library/Zend/Db/Adapter/StatementContainerInterface.php b/library/Zend/Db/Adapter/StatementContainerInterface.php index 275a6d461bf..d1beb7dfc70 100644 --- a/library/Zend/Db/Adapter/StatementContainerInterface.php +++ b/library/Zend/Db/Adapter/StatementContainerInterface.php @@ -18,27 +18,31 @@ interface StatementContainerInterface { /** - * @abstract + * Set sql + * * @param $sql * @return mixed */ public function setSql($sql); /** - * @abstract + * Get sql + * * @return mixed */ public function getSql(); /** - * @abstract + * Set parameter container + * * @param ParameterContainer $parameterContainer * @return mixed */ public function setParameterContainer(ParameterContainer $parameterContainer); /** - * @abstract + * Get parameter container + * * @return mixed */ public function getParameterContainer();