src/libraries/adapters/DatabaseMySql.php
/** Prepare resource map to store in the database
   */
Prepare resource map to store in the database
Prepare resource map to store in the database
private function prepareResourceMap($params)
  {
    $resource = array();
    if(isset($params['uri']))
    {
      $resource['uri'] = $params['uri'];
      unset($params['uri']);
    }
    if(isset($params['method']))
    {
      $resource['method'] = $params['method'];
      unset($params['method']);
    }
    if(empty($resource))
      $params['resource'] = '';
    else
      $params['resource'] = json_encode($resource);
    return $params;
  }
private function prepareResourceMap ( $ params ) { $ resource = array ( ) ; if ( isset ( $ params [ 'uri' ] ) ) { $ resource [ 'uri' ] = $ params [ 'uri' ] ; unset ( $ params [ 'uri' ] ) ; } if ( isset ( $ params [ 'method' ] ) ) { $ resource [ 'method' ] = $ params [ 'method' ] ; unset ( $ params [ 'method' ] ) ; } if ( empty ( $ resource ) ) $ params [ 'resource' ] = '' ; else $ params [ 'resource' ] = json_encode ( $ resource ) ; return $ params ; }
Prepare resource map to store in the database
Prepare resource map to store in the database