public static function hydrate(stdClass $controller)
    {
        $hydrated = new ControllerEntity();

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

        if (isset($controller->class)) {
            $hydrated->setClass($controller->class);
        }

        if (isset($controller->method)) {
            $hydrated->setMethod($controller->method);
        }

        if (isset($controller->parameter)) {
            $hydrated->setParameter($controller->parameter);
        }

        if (isset($controller->type)) {
            $hydrated->setType($controller->type);
        }

        return $hydrated;
    }