Exemplo n.º 1
0
 public function fromArray(array $values)
 {
     foreach ($values as $attribute => $value) {
         if (property_exists($this, $attribute)) {
             $attribute = \Util\Text::sanitizeAttributeName($attribute);
             $this->{$attribute} = $value;
         }
     }
 }
Exemplo n.º 2
0
Arquivo: Bo.php Projeto: pixlr/SZES
 public function __construct(\Model\DAO\Engine\DaoLoader $dao)
 {
     $this->dao_loader = $dao;
     $this->dao = $this->dao_loader[get_called_class()];
     $this->labels = array();
     $cols = $this->dao->getColumns();
     foreach ($cols as $col) {
         $this->labels[$col] = \Util\Text::generateLabel($col);
     }
 }
Exemplo n.º 3
0
Arquivo: Dao.php Projeto: pixlr/SZES
 protected function entityFromArray(array $values)
 {
     $object = false;
     if (!empty($values)) {
         $class = '\\Model\\' . \Util\Text::classNameOnly(get_called_class());
         $object = new $class();
         $object->fromArray($values);
     }
     return $object;
 }
Exemplo n.º 4
0
 public function offsetUnset($dao_name)
 {
     unset($this->container[\Util\Text::classNameOnly($dao_name)]);
 }