IUpdate databox fields and status

This commit is contained in:
Romain Neutron
2012-09-21 15:00:10 +02:00
parent 07a8748f8d
commit 4328d832ab
4 changed files with 94 additions and 117 deletions

View File

@@ -14,7 +14,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class databox_subdefsStructure implements IteratorAggregate
class databox_subdefsStructure implements IteratorAggregate, Countable
{
/**
*
@@ -31,6 +31,16 @@ class databox_subdefsStructure implements IteratorAggregate
return new ArrayIterator($this->AvSubdefs);
}
public function count()
{
$n = 0;
foreach($this->AvSubdefs as $subdefs) {
$n += count($subdefs);
}
return $n;
}
/**
*
* @param databox $databox