westdc-zf1/application/module/Westdc/Visual/VariableEncoder.php

32 lines
391 B
PHP

<?php
namespace Westdc\Visual;
class VariableEncoder
{
function __construct()
{
}
public function __invoke($json)
{
$this->decode($json);
}
public function encode($vars)
{
return json_encode($vars);
}
public function decode($json)
{
$arr = json_decode($json,true);
return $arr;
}
public function normaldecode($json)
{
return json_decode($json,true);
}
}