1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-13 17:44:11 +02:00

All setters provide a fluent interface now (i.e. return $this)

This commit is contained in:
David Grudl
2009-09-18 03:38:10 +02:00
parent 6d353c0b5d
commit 16f6d537e0
3 changed files with 10 additions and 5 deletions

View File

@@ -485,11 +485,12 @@ class DibiResult extends DibiObject implements IDataSource
* @param string column
* @param string type (use constant Dibi::*)
* @param string optional format
* @return void
* @return DibiResult provides a fluent interface
*/
final public function setType($col, $type, $format = NULL)
{
$this->xlat[$col] = array('type' => $type, 'format' => $format);
return $this;
}
@@ -510,12 +511,13 @@ class DibiResult extends DibiObject implements IDataSource
/**
* Define multiple columns types.
* @param array
* @return void
* @return DibiResult provides a fluent interface
* @internal
*/
final public function setTypes(array $types)
{
$this->xlat = $types;
return $this;
}