public function limitArray($var, $depth, array &$references)
    {
        foreach ($var as &$value) {
            $value = $this->limit($value, $depth + 1, $references);
            unset($value);
        }

        return $var;
    }