public function inherits($class)
    {
        $result = false;
        $object = $this->getObject();

        if ($object instanceof AnObject) {
            $result = $object->inherits($class);
        } else {
            $result = $object instanceof $class;
        }

        return $result;
    }