Ejemplo n.º 1
0
 /**
  * Change the information's value types to the schema's value types.
  *
  * @param  array $attributes
  * @return array
  */
 protected function fixTypes($attributes)
 {
     // Load the schema keys for conversion.
     $schema = Parser::getEmptyDataSchema();
     foreach ($attributes as $key => &$value) {
         settype($value, gettype($schema[$key]));
     }
     return $attributes;
 }
Ejemplo n.º 2
0
 /**
  * 
  *
  * @since 1.0.0 Get an empty information schema array.
  * @return array 
  * @static 
  */
 public static function getEmptyDataSchema()
 {
     return \hisorange\BrowserDetect\Parser::getEmptyDataSchema();
 }