/** * Sets the item values from the given array. * * @param array $list Associative list of item keys and their values * @return array Associative list of keys and their values that are unknown */ public function fromArray(array $list) { $unknown = array(); $list = parent::fromArray($list); foreach ($list as $key => $value) { switch ($key) { case 'typo3.pageid': $this->setPageId($value); break; default: $unknown[$key] = $value; } } return $unknown; }
public static function fromArray($data) { $settings = new ReportOptions(); foreach ($data as $key => $value) { if (property_exists(get_class($settings), $key)) { if (is_array($value)) { if ($key == "standard") { $settings->{$key} = Standard::fromArray($value); } } else { $settings->{$key} = $value; } } } return $settings; }