public function __construct($args = []) { foreach ($args as $key => $val) { if (property_exists($this, $key)) { $this->{$key} = $val; } } parent::__construct(); }
/** Generally want to set at least basemodel & tpl_fields * @param array $args - initialization array */ public function __construct($args = []) { throw new PkException("Deprecated! Use PkHtmlPainter instead."); foreach ($args as $key => $val) { if (property_exists($this, $key)) { $this->{$key} = $val; } } //pkdebug("Args:", $args,"THIS", $this); parent::__construct(); }