private function discoverLanguage($nb_language) : CNabuLanguage
    {
        if (!($nb_language instanceof CNabuLanguage)) {
            $nb_language = new CNabuLanguage(nb_getMixedValue($nb_language, NABU_LANG_FIELD_ID));
        }

        if (!($nb_language instanceof CNabuLanguage) || $nb_language->isNew()) {
            throw new ENabuCoreException(ENabuCoreException::ERROR_LANGUAGE_REQUIRED);
        }

        return $nb_language;
    }
private function discoverLanguage($nb_language) : CNabuLanguage
    {
        if (!($nb_language instanceof CNabuLanguage)) {
            $nb_language = new CNabuLanguage(nb_getMixedValue($nb_language, NABU_LANG_FIELD_ID));
        }

        if (!($nb_language instanceof CNabuLanguage) || $nb_language->isNew()) {
            throw new ENabuCoreException(ENabuCoreException::ERROR_LANGUAGE_REQUIRED);
        }

        return $nb_language;
    }
private function discoverLanguage ( $ nb_language ) : CNabuLanguage { if ( ! ( $ nb_language instanceof CNabuLanguage ) ) { $ nb_language = new CNabuLanguage ( nb_getMixedValue ( $ nb_language , NABU_LANG_FIELD_ID ) ) ; } if ( ! ( $ nb_language instanceof CNabuLanguage ) || $ nb_language -> isNew ( ) ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_LANGUAGE_REQUIRED ) ; } return $ nb_language ; }
Discover the Language instance beside a lazzy reference to it.
@param mixed $nb_language A Language instance, a CNabuDataObject containing a field named nb_language_id,
or a valid Id.
@return CNabuLanguage Returns the Language instance discovered.
@throws ENabuCoreException Raises an exception if the reference is not valid.
Discover the Language instance beside a lazzy reference to it .