@param FacadeInterface $facade
@param array           $params

@return ContentTypeInterface|null
510437
public function reverseTransform(FacadeInterface $facade, array $params = array())
    {
        $contentTypes = array();
        $contentTypesFacade = $facade->getContentTypes();
        foreach ($contentTypesFacade as $contentTypeFacade) {
            $contentType = $this->getContext()->reverseTransform('content_type', $contentTypeFacade);
            if (null !== $contentType) {
                $contentTypes[] = $contentType;
            }
        }

        return $contentTypes;
    }
460094
public function transform($contentTypeCollection, array $params = array())
    {
        $facade = $this->newFacade();

        foreach ($contentTypeCollection as $contentType) {
            $facade->addContentType($this->getContext()->transform('content_type', $contentType));
        }

        return $facade;
    }
379877
public function formatData(string $interface, string $version, string $method, array $params): array
    {
        return [
            'interface' => $interface,
            'version' => $version,
            'method' => $method,
            'params' => $params,
            'logid' => RequestContext::getLogid(),
            'spanid' => RequestContext::getSpanid() + 1,
        ];
    }
882932
public function findOneBy (array $params)
    {
        $entity = $this->er->findOneBy($params);

        if (NULL == $entity) {
            return NULL;
        }

        return $this->getModel($entity);
    }
387161
public function transform($apiClientCollection, array $params = array())
    {
        $facade = $this->newFacade();

        foreach ($apiClientCollection as $apiClient) {
            $facade->addApiClient($this->getContext()->transform('api_client', $apiClient));
        }

        return $facade;
    }
477668
public function reverseTransform(FacadeInterface $facade, array $params = array())
    {
        $users = array();
        $usersFacade = $facade->getUsers();
        foreach ($usersFacade as $userFacade) {
            $user = $this->getContext()->reverseTransform('user', $userFacade);
            if (null !== $user) {
                $users[] = $user;
            }
        }

        return $users;
    }
1055666
private function _get_args_from_params(array $params)
	{
		$byType	=	$this->container->requestRouteParams;
		$args	=	[];
		foreach ($params as $param)
		{
			if ($param->hasType() && isset($byType[$type = strtolower($param->getType())]))
				$args[] = $byType[$type];
			else if (isset($this->params[$param->name]))
				$args[] = $this->params[$param->name];
			else if (isset($_GET[$param->name]))
				$args[] = $_GET[$param->name];
			else if (isset($_POST[$param->name]))
				$args[] = $_POST[$param->name];
			else
			{
				if ( ! $param->isOptional())
					throw new \Exception('Unable to find NON-optional parameter `' . $param->name . ($param->hasType() ? '` of type `' . $param->getType() : null) . '` for route controller/handler: ' . var_export($this->route, true));
				$args[] = $param->getDefaultValue();
			}
		}
		return $args;
	}
459994
private function getFormat(array $params, ResponseInterface $response)
    {
        if ($response->hasHeader('content-type')) {
            $header = $response->getHeaderLine('content-type');
            $format = $this->negotiator->getFormat($header);
        }

        if (isset($params['format'])) {
            $format = $params['format'];
        }

        if (!isset($format)) {
            throw new UnknownFormatException('Unable to figure out the format');
        }

        return $format;
    }
239982
public function transform($user, array $params = array())
    {
        if (!$user instanceof UserInterface) {
            throw new TransformerParameterTypeException();
        }

        $facade = $this->newFacade();

        $facade->id = $user->getId();
        $facade->username = $user->getUsername();
        $facade->email = $user->getEmail();
        $facade->roles = implode(',', $user->getRoles());

        $groups = $user->getGroups();
        $labels = array();
        foreach($groups as $group){
            if (!$group->isDeleted()) {
                $labels[] = $this->multiLanguagesChoiceManager->choose($group->getLabels());
            }
        }

        $facade->groups = implode(',', $labels);

        if ($this->hasGroup(CMSGroupContext::AUTHORIZATIONS)) {
            $canDelete = $this->authorizationChecker->isGranted(ContributionActionInterface::DELETE, $user);
            $facade->addRight('can_delete', $canDelete);
        }

        return $facade;
    }
1161135
public function transform($status, array $params = array())
    {
        $facade = $this->newFacade();

        $facade->codeColor = $status['displayColor'];

        return $facade;
    }
312951
public function reverseTransform(FacadeInterface $facade, array $params = array())
    {
        $medias = array();
        $mediasFacade = $facade->getMedias();
        foreach ($mediasFacade as $mediaFacade) {
            $media = $this->getContext()->reverseTransform('media', $mediaFacade);
            if (null !== $media) {
                $medias[] = $media;
            }
        }

        return $medias;
    }
771559
public function createConnection(
		array $params,
		?Configuration $config = null,
		?EventManager $eventManager = null
	): Connection
	{
		if (!$this->initialized) {
			$this->initializeTypes();
		}

		$connection = DriverManager::getConnection($params, $config, $eventManager);

		if (!empty($this->typesMapping)) {
			$platform = $this->getDatabasePlatform($connection);
			foreach ($this->typesMapping as $dbType => $doctrineType) {
				$platform->registerDoctrineTypeMapping((string) $dbType, $doctrineType);
			}
		}
		if (!empty($this->commentedTypes)) {
			$platform = $this->getDatabasePlatform($connection);
			foreach ($this->commentedTypes as $type) {
				$platform->markDoctrineTypeCommented(Type::getType($type));
			}
		}

		return $connection;
	}
770708
public function mergeParams($method, Array $params = [])
    {
        $result = parent::mergeParams($method, $params);

        foreach ($this->map as $oldKey => $newKey)
        {
            if (array_key_exists($oldKey, $result[$method])) {
                $result[$method][$newKey] = $result[$method][$oldKey];
                $result[$method][$oldKey] = null;
                unset($result[$method][$oldKey]);
            }
        }

        return $result;
    }
1181389
public function setParams($params)
    {
        if (is_array($params) && isset($params['application'])) {
            $this->setApplicationEntity($params['application']);
            unset($params['application']);
        } elseif (is_object($params) && isset($params->application)) {
            $this->setApplicationEntity($params->application);
        }

        if (is_array($params) && isset($params['user'])) {
            $this->setUser($params['user']);
            unset($params['user']);
        }

        if (is_array($params) && isset($params['status'])) {
            $this->setStatus($params['status']);
            unset($params['status']);
        }

        return parent::setParams($params);
    }
1150884
public function reverseTransform(FacadeInterface $facade, array $params = array())
    {
        $contents = array();
        $contentsFacade = $facade->getContents();
        foreach ($contentsFacade as $contentFacade) {
            $content = $this->getContext()->reverseTransform('content', $contentFacade);
            if (null !== $content) {
                $contents[] = $content;
            }
        }

        return $contents;
    }
138428
protected static function resolveFullUrl($entities = [], $params = [])
    {
        $uri = static::getUri();

        if (!empty($entities)) {
            if (is_array($entities)) {
                $entities = implode('/', $entities) . '/';
            }

            if (!is_scalar($entities)) {
                throw new InvalidQueryException();
            }

            $uri .= $entities;
        }

        if (!empty($params)) {
            $uri .= '?' . http_build_query($params);
        }

        return $uri;
    }
1311845
public function transform($node, array $params = array())
    {
        $facade = $this->newFacade();

        $facade->nodeId = $node['nodeId'];
        $facade->name = $node['name'];
        $facade->language = $node['language'];
        $facade->version = $node['version'];
        $facade->siteId = $node['siteId'];
        $facade->order = $node['order'];
        $facade->status = $this->getContext()->transform('status_node_tree', $node['status']);
        $facade->nodeType = $node['nodeType'];

        $facade->addRight('can_create', (
            $this->authorizationChecker->isGranted(ContributionActionInterface::CREATE, $node) &&
            NodeInterface::TYPE_DEFAULT === $node['nodeType']
        ));
        $facade->addRight('can_read', $this->authorizationChecker->isGranted(ContributionActionInterface::READ, $node));
        $facade->addRight('can_edit', $this->authorizationChecker->isGranted(ContributionActionInterface::EDIT, $node));

        return $facade;
    }