public function loadViewState() { $this->state->loadViewState(); }
public function setData($value) { $data = new stdClass(); // se for o $_REQUEST, converte para objeto $valid = is_object($value) || is_array($value) && count($value); if ($valid) { foreach ($value as $name => $value) { if (strpos($name, '::') !== false) { list($obj, $name) = explode('::', $name); $data->{$obj}->{$name} = $value; } else { $data->{$name} = $value; } if (strpos($name, '__VIEWSTATE') !== false) { $var = str_replace('__VIEWSTATE', '', $name); $state = new MState($var); $state->loadViewState(); } } } Manager::setData($data); }