Example #1
0
 /**
  * Check the options
  *
  * Overridable static method that checks $options for missing or invalid
  * values and eventually corrects its content.
  *
  * @param  array &$options Properties values
  * @return bool            true on success or false on error
  */
 protected static function checkOptions(&$options)
 {
     return parent::checkOptions($options) && isset($options['database'], $options['user'], $options['password']);
 }
Example #2
0
 /**
  * Ensures the required 'fields_xpath' option is defined
  *
  * @param  array &$options Properties values
  * @return bool            true on success or false on error
  */
 protected static function checkOptions(&$options)
 {
     if (!parent::checkOptions($options) || !@is_array($options['fields_xpath'])) {
         return false;
     }
     return true;
 }