public function transform($object)
    {
        if (is_object($object) && $object instanceof RestfulModel) {
            $transformed = $this->transformRestfulModel($object);
        } elseif (is_object($object) && $object instanceof \stdClass) {
            $transformed = $this->transformStdClass($object);
        } else {
            throw new \Exception('Unexpected object type encountered in transformer');
        }

        return $transformed;
    }