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

PR for Add clear docblock to all classes and interfaces #298

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions src/Adapter/AdapterServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
namespace Zend\Db\Adapter;

use Interop\Container\ContainerInterface;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

Expand All @@ -22,6 +24,8 @@ class AdapterServiceFactory implements FactoryInterface
* @param string $requestedName
* @param array $options
* @return Adapter
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Adapter/StatementContainerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@ interface StatementContainerInterface
/**
* Set sql
*
* @param $sql
* @return mixed
* @param string $sql
* @return self
*/
public function setSql($sql);

/**
* Get sql
*
* @return mixed
* @return string
*/
public function getSql();

/**
* Set parameter container
*
* @param ParameterContainer $parameterContainer
* @return mixed
* @return self
*/
public function setParameterContainer(ParameterContainer $parameterContainer);

/**
* Get parameter container
*
* @return mixed
* @return ParameterContainer
*/
public function getParameterContainer();
}
3 changes: 3 additions & 0 deletions src/ResultSet/AbstractResultSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ public function buffer()
return $this;
}

/**
* @return bool
*/
public function isBuffered()
{
if ($this->buffer === -1 || is_array($this->buffer)) {
Expand Down
9 changes: 4 additions & 5 deletions src/TableGateway/AbstractTableGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public function isInitialized()
* Initialize
*
* @throws Exception\RuntimeException
* @return null
*/
public function initialize()
{
Expand Down Expand Up @@ -158,7 +157,7 @@ public function getFeatureSet()
/**
* Get select result prototype
*
* @return ResultSet
* @return ResultSetInterface
*/
public function getResultSetPrototype()
{
Expand All @@ -177,7 +176,7 @@ public function getSql()
* Select
*
* @param Where|\Closure|string|array $where
* @return ResultSet
* @return ResultSetInterface
*/
public function select($where = null)
{
Expand Down Expand Up @@ -211,7 +210,7 @@ public function selectWith(Select $select)

/**
* @param Select $select
* @return ResultSet
* @return ResultSetInterface
* @throws Exception\RuntimeException
*/
protected function executeSelect(Select $select)
Expand Down Expand Up @@ -350,7 +349,7 @@ public function update($set, $where = null, array $joins = null)
}

/**
* @param \Zend\Db\Sql\Update $update
* @param Update $update
* @return int
*/
public function updateWith(Update $update)
Expand Down
37 changes: 37 additions & 0 deletions src/TableGateway/TableGatewayInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,48 @@

namespace Zend\Db\TableGateway;

use Zend\Db\ResultSet\ResultSetInterface;
use Zend\Db\Sql\Where;

interface TableGatewayInterface
{
/**
* Return the table name
*
* @return string
*/
public function getTable();

/**
* Select values by conditions
*
* @param Where|\Closure|string|array|null $where
* @return ResultSetInterface
*/
public function select($where = null);

/**
* Insert values given by array
*
* @param array $set
* @return int number of affected rows
*/
public function insert($set);

/**
* Update values by condition
*
* @param array $set
* @param string|array|\Closure|null $where
* @return int number of affected rows
*/
public function update($set, $where = null);

/**
* Delete values by condition
*
* @param Where|\Closure|string|array $where
* @return int number of affected rows
*/
public function delete($where);
}