1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-21 05:11:49 +02:00

- added DibiFluent

- bugfix in dibi::dump()
This commit is contained in:
David Grudl
2008-05-21 11:20:46 +00:00
parent 69876a70b7
commit 3728b16a21
7 changed files with 477 additions and 8 deletions

View File

@@ -495,13 +495,36 @@ class DibiResult extends /*Nette::*/Object implements IDataSource
final public function setType($col, $type = NULL, $format = NULL)
/**
* Define column type.
* @param string column
* @param string type (use constant Dibi::FIELD_*)
* @param string optional format
* @return void
*/
final public function setType($col, $type, $format = NULL)
{
$this->xlat[$col] = array($type, $format);
}
/**
* Define multiple columns types (for internal usage).
* @param array
* @return void
*/
final public function setTypes(array $types)
{
$this->xlat = $types;
}
/**
* Returns column type.
* @return array ($type, $format)
*/
final public function getType($col)
{
return isset($this->xlat[$col]) ? $this->xlat[$col] : NULL;
@@ -509,6 +532,10 @@ class DibiResult extends /*Nette::*/Object implements IDataSource
/**
* Converts value to specified type and format
* @return array ($type, $format)
*/
final public function convert($value, $type, $format = NULL)
{
if ($value === NULL || $value === FALSE) {