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

32 lines
391 B
PHP
Raw Normal View History

<?php
namespace Westdc\Visual;
class VariableEncoder
{
function __construct()
{
}
public function __invoke($json)
{
$this->decode($json);
}
public function encode($vars)
{
2014-12-22 06:35:15 +00:00
return json_encode($vars);
}
public function decode($json)
{
$arr = json_decode($json,true);
2014-12-22 06:35:15 +00:00
return $arr;
}
public function normaldecode($json)
{
return json_decode($json,true);
}
}