protected function getQueryNameAndAliasForType($typeDefinitionMixed, $autoAlias)
    {
        $alias = null;
        if (is_array($typeDefinitionMixed)) {
            list ($typeDefinitionMixed, $alias) = $typeDefinitionMixed;
        }
        if ($typeDefinitionMixed instanceof TypeDefinitionInterface) {
            $queryName = $typeDefinitionMixed->getQueryName();
        } elseif (is_string($typeDefinitionMixed) && strpos($typeDefinitionMixed, ' ')) {
            list ($typeDefinitionMixed, $alias) = explode(' ', $typeDefinitionMixed, 2);
        }
        try {
            $queryName = $this->session->getTypeDefinition($typeDefinitionMixed)->getQueryName();
        } catch (CmisObjectNotFoundException $error) {
            $queryName = $typeDefinitionMixed;
        }
        return [$queryName, ($alias ? $alias : $autoAlias)];
    }
protected function getQueryNameAndAliasForType($typeDefinitionMixed, $autoAlias)
    {
        $alias = null;
        if (is_array($typeDefinitionMixed)) {
            list ($typeDefinitionMixed, $alias) = $typeDefinitionMixed;
        }
        if ($typeDefinitionMixed instanceof TypeDefinitionInterface) {
            $queryName = $typeDefinitionMixed->getQueryName();
        } elseif (is_string($typeDefinitionMixed) && strpos($typeDefinitionMixed, ' ')) {
            list ($typeDefinitionMixed, $alias) = explode(' ', $typeDefinitionMixed, 2);
        }
        try {
            $queryName = $this->session->getTypeDefinition($typeDefinitionMixed)->getQueryName();
        } catch (CmisObjectNotFoundException $error) {
            $queryName = $typeDefinitionMixed;
        }
        return [$queryName, ($alias ? $alias : $autoAlias)];
    }
protected function getQueryNameAndAliasForType ( $ typeDefinitionMixed , $ autoAlias ) { $ alias = null ; if ( is_array ( $ typeDefinitionMixed ) ) { list ( $ typeDefinitionMixed , $ alias ) = $ typeDefinitionMixed ; } if ( $ typeDefinitionMixed instanceof TypeDefinitionInterface ) { $ queryName = $ typeDefinitionMixed -> getQueryName ( ) ; } elseif ( is_string ( $ typeDefinitionMixed ) && strpos ( $ typeDefinitionMixed , ' ' ) ) { list ( $ typeDefinitionMixed , $ alias ) = explode ( ' ' , $ typeDefinitionMixed , 2 ) ; } try { $ queryName = $ this -> session -> getTypeDefinition ( $ typeDefinitionMixed ) -> getQueryName ( ) ; } catch ( CmisObjectNotFoundException $ error ) { $ queryName = $ typeDefinitionMixed ; } return [ $ queryName , ( $ alias ? $ alias : $ autoAlias ) ] ; }
Translates a TypeDefinition or string into a query name for
that TypeDefinition. Returns the input string as fallback if
the type could not be resolved. Input may contain an alias,
if so, we split and preserve the alias but attempt to translate
the type ID part.

@param mixed $typeDefinitionMixed Input describing the type
@param string $autoAlias If alias is not provided
@return array
Translates a TypeDefinition or string into a query name for that TypeDefinition . Returns the input string as fallback if the type could not be resolved . Input may contain an alias if so we split and preserve the alias but attempt to translate the type ID part .