<?php
class Pampa_Util_Array {

  public static function fromObject($obj) {
    $retorno = array();
    foreach($obj as $v => $k) {
      $retorno[$v] = $k;
    }
    return $retorno;
  }

  public static function toObject($array) {
    $retorno = new stdClass();
    foreach($array as $v => $k) {
      $retorno->$v = $k;
    }
    return $retorno;
  }

}