标签:php
/**
* Determine(判断) if the given content should be turned into JSON.
*
* @param mixed $content
* @return bool
*/
protected function shouldBeJson($content)
{
return $content instanceof Arrayable ||
$content instanceof Jsonable ||
$content instanceof ArrayObject ||
$content instanceof JsonSerializable ||
is_array($content);
}
TODO
标签:php
原文地址:http://blog.51cto.com/phpme/2129061