public static function hydrate(stdClass $extension)
    {
        $hydrated = new ExtensionEntity();

        if (isset($extension->id)) {
            $hydrated->setId($extension->id);
        }

        if (isset($extension->extension)) {
            $hydrated->setExtension($extension->extension);
        }

        return $hydrated;
    }