Skip to content

Commit

Permalink
🔨 BASE #220 novos metodos
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Mar 10, 2020
1 parent a18e7b9 commit 7d206e7
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions base/classes/helpers/FormDinHelper.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,35 @@ public static function convertVo2ArrayFormDin($vo)
}
return $arrayFormDin;
}

//--------------------------------------------------------------------------------
/***
* Convert Object Vo to Array PDO
* @param object $vo
* @throws InvalidArgumentException
* @return array
*/
public static function convertVo2ArrayPDO($vo)
{
$arrayFormDin = self::convertVo2ArrayFormDin($vo);
$arrayPDO = ArrayHelper::convertArrayFormDin2Pdo($arrayFormDin);
return $arrayPDO;
}

//--------------------------------------------------------------------------------
/***
* Convert Object Vo to JSON
* @param object $vo
* @throws InvalidArgumentException
* @return array
*/
public static function convertVo2Json($vo)
{
$arrayPDO = self::convertVo2ArrayPDO($vo);
$json = json_encode($arrayPDO[0]);
return $json;
}


/**
* @deprecated chante to ValidateHelper::methodLine
Expand Down

0 comments on commit 7d206e7

Please sign in to comment.