Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Zend\Db\Sql setTable method ommit array #4290

Merged
merged 5 commits into from
May 9, 2013
Merged

Zend\Db\Sql setTable method ommit array #4290

merged 5 commits into from
May 9, 2013

Conversation

YannickDa
Copy link
Contributor

Add array type for setting table

Add array type for setting table
@ghost ghost assigned ralphschindler Apr 22, 2013
@@ -48,7 +48,7 @@ public function hasTable()

public function setTable($table)
{
if (is_string($table) || $table instanceof TableIdentifier) {
if (is_string($table) || is_array($table) || $table instanceof TableIdentifier) {
$this->table = $table;
} else {
throw new Exception\InvalidArgumentException('Table must be a string or instance of TableIdentifier.');
Copy link
Contributor

Choose a reason for hiding this comment

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

so the exception should be 'Table must be a string, array, or instance of TableIdentifier.'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exact ! I have forget this.

Add information to the Exception
@samsonasik
Copy link
Contributor

then /** @var string / at protected $table should be /* @var array */
and in Zend\Db\Sql\Select.php
@param null|string $table in __construct should be @param null|string|array|TableIdentifier $table

Modify the exception on SqlTest
Adding information to the protected $table relative to its type
Adding information about $table property
ralphschindler pushed a commit that referenced this pull request May 9, 2013
Merge branch 'SqlSetTable' of git://github.com/YannickDa/zf2 into YannickDa-SqlSetTable
ralphschindler pushed a commit that referenced this pull request May 9, 2013
Merge branch 'YannickDa-SqlSetTable'
@ralphschindler ralphschindler merged commit 881bf08 into zendframework:master May 9, 2013
ralphschindler pushed a commit that referenced this pull request May 9, 2013
Merge branch 'YannickDa-SqlSetTable' into develop
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants