1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-07 22:56:35 +02:00

typos & whitespace

This commit is contained in:
David Grudl
2013-12-30 23:19:42 +01:00
parent 6f99db544f
commit 8112fe10d0
51 changed files with 592 additions and 1412 deletions

View File

@@ -2,15 +2,10 @@
/**
* This file is part of the "dibi" - smart database abstraction layer.
*
* Copyright (c) 2005 David Grudl (http://davidgrudl.com)
*
* For the full copyright and license information, please view
* the file license.txt that was distributed with this source code.
*/
/**
* Result set single row.
*
@@ -22,18 +17,18 @@ class DibiRow implements ArrayAccess, IteratorAggregate, Countable
public function __construct($arr)
{
foreach ($arr as $k => $v) $this->$k = $v;
foreach ($arr as $k => $v) {
$this->$k = $v;
}
}
public function toArray()
{
return (array) $this;
}
/**
* Converts value to DateTime object.
* @param string key
@@ -53,7 +48,6 @@ class DibiRow implements ArrayAccess, IteratorAggregate, Countable
}
/**
* Converts value to UNIX timestamp.
* @param string key
@@ -69,7 +63,6 @@ class DibiRow implements ArrayAccess, IteratorAggregate, Countable
}
/**
* Converts value to boolean.
* @param string key
@@ -82,7 +75,6 @@ class DibiRow implements ArrayAccess, IteratorAggregate, Countable
}
/** @deprecated */
public function asDate($key, $format = NULL)
{
@@ -95,46 +87,39 @@ class DibiRow implements ArrayAccess, IteratorAggregate, Countable
}
/********************* interfaces ArrayAccess, Countable & IteratorAggregate ****************d*g**/
final public function count()
{
return count((array) $this);
}
final public function getIterator()
{
return new ArrayIterator($this);
}
final public function offsetSet($nm, $val)
{
$this->$nm = $val;
}
final public function offsetGet($nm)
{
return $this->$nm;
}
final public function offsetExists($nm)
{
return isset($this->$nm);
}
final public function offsetUnset($nm)
{
unset($this->$nm);