Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions library/Zend/Db/Adapter/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ public function getCurrentSchema()
*
* @param string $sql
* @param string|array|ParameterContainer $parametersOrQueryMode
* @param \Zend\Db\ResultSet\ResultSetInterface $resultPrototype
* @throws Exception\InvalidArgumentException
* @return Driver\StatementInterface|ResultSet\ResultSet
*/
Expand Down
13 changes: 13 additions & 0 deletions library/Zend/Db/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

namespace Zend\Db\Adapter;

use Zend\Db\ResultSet;

/**
*
* @property Driver\DriverInterface $driver
Expand All @@ -25,4 +27,15 @@ public function getDriver();
* @return Platform\PlatformInterface
*/
public function getPlatform();

/**
* query() is a convenience function
*
* @param string $sql
* @param string|array|ParameterContainer $parametersOrQueryMode
* @param \Zend\Db\ResultSet\ResultSetInterface $resultPrototype
* @throws Exception\InvalidArgumentException
* @return Driver\StatementInterface|ResultSet\ResultSet
*/
public function query($sql, $parametersOrQueryMode, ResultSet\ResultSetInterface $resultPrototype = null);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a major BC break and I will have to remove it on merge.

}
10 changes: 5 additions & 5 deletions library/Zend/Db/Sql/Ddl/Column/Blob.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class Blob extends Column
protected $type = 'BLOB';

/**
* @param null $name
* @param int $length
* @param bool $nullable
* @param null $default
* @param array $options
* @param string $name
* @param int $length
* @param bool $nullable
* @param null $default
* @param array $options
*/
public function __construct($name, $length, $nullable = false, $default = null, array $options = array())
{
Expand Down
20 changes: 20 additions & 0 deletions library/Zend/Db/Sql/Ddl/Column/ColumnInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,30 @@

use Zend\Db\Sql\ExpressionInterface;

/**
* Interface ColumnInterface describes the protocol on how Column objects interact
*
* @package Zend\Db\Sql\Ddl\Column
*/
interface ColumnInterface extends ExpressionInterface
{
/**
* @return string
*/
public function getName();

/**
* @return bool
*/
public function isNullable();

/**
* @return null|string|int
*/
public function getDefault();

/**
* @return array
*/
public function getOptions();
}
6 changes: 3 additions & 3 deletions library/Zend/Db/Sql/Ddl/Constraint/UniqueKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class UniqueKey extends AbstractConstraint
protected $specification = 'CONSTRAINT UNIQUE KEY %s(...)';

/**
* @param string $column
* @param array $columns
* @param null|string $name
*/
public function __construct($column, $name = null)
public function __construct($columns, $name = null)
{
$this->setColumns($column);
$this->setColumns($columns);
$this->name = $name;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/ZendTest/Db/TableGateway/Feature/FeatureSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testAddFeatureThatFeatureDoesnotHasTableGatewayButFeatureSetHas(
{
$mockMasterAdapter = $this->getMock(
'Zend\Db\Adapter\AdapterInterface',
array('getDriver', 'getPlatform')
array('getDriver', 'getPlatform', 'query')
);

$mockStatement = $this->getMock('Zend\Db\Adapter\Driver\StatementInterface');
Expand All @@ -36,7 +36,7 @@ public function testAddFeatureThatFeatureDoesnotHasTableGatewayButFeatureSetHas(

$mockSlaveAdapter = $this->getMock(
'Zend\Db\Adapter\AdapterInterface',
array('getDriver', 'getPlatform')
array('getDriver', 'getPlatform', 'query')
);

$mockStatement = $this->getMock('Zend\Db\Adapter\Driver\StatementInterface');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function setup()
{
$this->mockMasterAdapter = $this->getMock(
'Zend\Db\Adapter\AdapterInterface',
array('getDriver', 'getPlatform')
array('getDriver', 'getPlatform', 'query')
);

$mockStatement = $this->getMock('Zend\Db\Adapter\Driver\StatementInterface');
Expand All @@ -43,7 +43,7 @@ public function setup()

$this->mockSlaveAdapter = $this->getMock(
'Zend\Db\Adapter\AdapterInterface',
array('getDriver', 'getPlatform')
array('getDriver', 'getPlatform', 'query')
);

$mockStatement = $this->getMock('Zend\Db\Adapter\Driver\StatementInterface');
Expand Down