/** * @param array $options */ public function __construct($options = array()) { foreach ($options as $name => $value) { $method = 'set' . $name; if (method_exists($this, $method)) { $this->{$method}($value); } } self::$optionsInstance = $options; }