private function parseMapping($name, $value, SwatUIObject $object)
    {
        $renderer = null;
        $renderer_container = null;

        foreach (array_reverse($this->stack) as $ancestor) {
            if ($renderer === null && $ancestor instanceof SwatCellRenderer) {
                $renderer = $ancestor;
            } elseif ($ancestor instanceof SwatCellRendererContainer) {
                $renderer_container = $ancestor;
                break;
            }
        }

        if ($renderer === null || $renderer_container === null) {
            throw new SwatInvalidPropertyTypeException(
                "Property type 'data' is only allowed on a SwatCellRenderer " .
                    'or on a widget within a SwatWidgetCellRenderer.',
                0,
                $object,
                'data'
            );
        }

        $mapping = $renderer_container->addMappingToRenderer(
            $renderer,
            $value,
            $name,
            $object
        );

        return $mapping;
    }