Exemplo n.º 1
0
 /**
  * Конвертирует входной массив в Json или JsonCollection
  * @param array $bemjson
  * @return Json
  */
 public function phpize($bemjson)
 {
     if (isList($bemjson)) {
         return JsonCollection::normalize($bemjson);
     }
     return JsonCollection::normalizeItem($bemjson);
 }
Exemplo n.º 2
0
 public function setContent($content)
 {
     $this->content = is_null($content) || is_scalar($content) ? $content : JsonCollection::normalize($content);
 }