/** * Constructor * * Sets the _ID and valid initiation arguments. * * @param array $initArgs instance options * * @return Xiphe\HTML */ public function __construct($initArgs = array()) { if (empty($this->_ID)) { $this->_ID = self::$_cID++; if (!empty($initArgs) && is_string($initArgs)) { $initArgs = array('baseUrl' => $initArgs); } foreach (Core\Config::getDefaults() as $k => $v) { if (isset($initArgs[$k])) { $this->{$k} = $initArgs[$k]; } } } return $this; }