private function __appendBodyClass(array $context = array())
    {
        $body_class = '';

        foreach ($context as $key => $value) {
            if (is_numeric($value)) {
                $value = 'id-' . $value;

                // Add prefixes to all context values by making the
                // class be {key}-{value}. #1397 ^BA
            } elseif (!is_numeric($key) && isset($value)) {
                // Skip arrays
                if (is_array($value)) {
                    $value = null;
                } else {
                    $value = str_replace('_', '-', $key) . '-'. $value;
                }
            }

            if ($value !== null) {
                $body_class .= trim($value) . ' ';
            }
        }

        $classes = array_merge(explode(' ', trim($body_class)), explode(' ', trim($this->_body_class)));
        $body_class = trim(implode(' ', $classes));

        if (!empty($body_class)) {
            $this->Body->setAttribute('class', $body_class);
        }
    }