Refactor databox_field :: name generation

This commit is contained in:
Romain Neutron
2012-01-20 15:53:18 +01:00
parent 22559b0474
commit 7d98dc7f27
3 changed files with 22 additions and 13 deletions

View File

@@ -75,7 +75,7 @@ class databox_descriptionStructure implements IteratorAggregate
/**
*
* @param <type> $name
* @param int $id
* @return databox_field
*/
public function get_element($id)
@@ -93,6 +93,8 @@ class databox_descriptionStructure implements IteratorAggregate
*/
public function get_element_by_name($name)
{
$name = databox_field::generateName($name);
if (isset($this->cache_name_id[$name]))
return $this->elements[$this->cache_name_id[$name]];