mirror of
https://github.com/dg/dibi.git
synced 2025-02-24 10:53:17 +01:00
All setters provide a fluent interface now (i.e. return $this)
This commit is contained in:
parent
6d353c0b5d
commit
16f6d537e0
@ -629,11 +629,12 @@ class DibiConnection extends DibiObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param IDibiProfiler
|
* @param IDibiProfiler
|
||||||
* @return void
|
* @return DibiConnection provides a fluent interface
|
||||||
*/
|
*/
|
||||||
public function setProfiler(IDibiProfiler $profiler = NULL)
|
public function setProfiler(IDibiProfiler $profiler = NULL)
|
||||||
{
|
{
|
||||||
$this->profiler = $profiler;
|
$this->profiler = $profiler;
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,22 +60,24 @@ class DibiProfiler extends DibiObject implements IDibiProfiler
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string filename
|
* @param string filename
|
||||||
* @return void
|
* @return DibiProfiler provides a fluent interface
|
||||||
*/
|
*/
|
||||||
public function setFile($file)
|
public function setFile($file)
|
||||||
{
|
{
|
||||||
$this->file = $file;
|
$this->file = $file;
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int
|
* @param int
|
||||||
* @return void
|
* @return DibiProfiler provides a fluent interface
|
||||||
*/
|
*/
|
||||||
public function setFilter($filter)
|
public function setFilter($filter)
|
||||||
{
|
{
|
||||||
$this->filter = (int) $filter;
|
$this->filter = (int) $filter;
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -485,11 +485,12 @@ class DibiResult extends DibiObject implements IDataSource
|
|||||||
* @param string column
|
* @param string column
|
||||||
* @param string type (use constant Dibi::*)
|
* @param string type (use constant Dibi::*)
|
||||||
* @param string optional format
|
* @param string optional format
|
||||||
* @return void
|
* @return DibiResult provides a fluent interface
|
||||||
*/
|
*/
|
||||||
final public function setType($col, $type, $format = NULL)
|
final public function setType($col, $type, $format = NULL)
|
||||||
{
|
{
|
||||||
$this->xlat[$col] = array('type' => $type, 'format' => $format);
|
$this->xlat[$col] = array('type' => $type, 'format' => $format);
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -510,12 +511,13 @@ class DibiResult extends DibiObject implements IDataSource
|
|||||||
/**
|
/**
|
||||||
* Define multiple columns types.
|
* Define multiple columns types.
|
||||||
* @param array
|
* @param array
|
||||||
* @return void
|
* @return DibiResult provides a fluent interface
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
final public function setTypes(array $types)
|
final public function setTypes(array $types)
|
||||||
{
|
{
|
||||||
$this->xlat = $types;
|
$this->xlat = $types;
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user