src/libraries/adapters/DatabaseMySql.php
/**
    * Normalizes data from MySql into schema definition
    *
    * @param SimpleXMLObject $raw An action from SimpleDb in SimpleXML.
    * @return array
    */
Normalizes data from MySql into schema definition
@param SimpleXMLObject $raw An action from SimpleDb in SimpleXML.
@return array
Normalizes data from MySql into schema definition @param SimpleXMLObject $raw An action from SimpleDb in SimpleXML . @return array
private function normalizeAlbum($raw)
  {
    if(empty($raw))
      return $raw;
    $raw['cover'] = null;
    if(!empty($raw['extra']))
    {
      $extra = json_decode($raw['extra'], 1);
      if(isset($extra['cover']))
        $raw['cover'] = $extra['cover'];
    }
    if(empty($raw['groups']))
      $raw['groups'] = array();
    else
      $raw['groups'] = (array)explode(',', $raw['groups']);
    unset($raw['extra']);
    return $raw;
  }
private function normalizeAlbum ( $ raw ) { if ( empty ( $ raw ) ) return $ raw ; $ raw [ 'cover' ] = null ; if ( ! empty ( $ raw [ 'extra' ] ) ) { $ extra = json_decode ( $ raw [ 'extra' ] , 1 ) ; if ( isset ( $ extra [ 'cover' ] ) ) $ raw [ 'cover' ] = $ extra [ 'cover' ] ; } if ( empty ( $ raw [ 'groups' ] ) ) $ raw [ 'groups' ] = array ( ) ; else $ raw [ 'groups' ] = ( array ) explode ( ',' , $ raw [ 'groups' ] ) ; unset ( $ raw [ 'extra' ] ) ; return $ raw ; }
Normalizes data from MySql into schema definition
 @param SimpleXMLObject $raw An action from SimpleDb in SimpleXML.
Normalizes data from MySql into schema definition @param SimpleXMLObject $raw An action from SimpleDb in SimpleXML .