public function getCatalog($nb_catalog)
    {
        $retval = false;

        if (is_object($nb_catalog) && !($nb_catalog instanceof CNabuDataObject)) {
            throw new ENabuCoreException(
                ENabuCoreException::ERROR_UNEXPECTED_PARAM_CLASS_TYPE,
                array('$nb_catalog', get_class($nb_catalog))
            );
        }

        if ($nb_catalog !== null) {
            $nb_catalog_id = nb_getMixedValue($nb_catalog, NABU_CATALOG_FIELD_ID);
            if (is_numeric($nb_catalog_id) || nb_isValidGUID($nb_catalog_id)) {
                $retval = $this->nb_catalog_list->getItem($nb_catalog_id);
            } elseif ($nb_catalog_id !== null && $nb_catalog_id !== false) {
                throw new ENabuCoreException(
                    ENabuCoreException::ERROR_UNEXPECTED_PARAM_VALUE,
                    array('$nb_catalog', print_r($nb_catalog, true))
                );
            }
        }

        return $retval;
    }
public function getCatalog($nb_catalog)
    {
        $retval = false;

        if (is_object($nb_catalog) && !($nb_catalog instanceof CNabuDataObject)) {
            throw new ENabuCoreException(
                ENabuCoreException::ERROR_UNEXPECTED_PARAM_CLASS_TYPE,
                array('$nb_catalog', get_class($nb_catalog))
            );
        }

        if ($nb_catalog !== null) {
            $nb_catalog_id = nb_getMixedValue($nb_catalog, NABU_CATALOG_FIELD_ID);
            if (is_numeric($nb_catalog_id) || nb_isValidGUID($nb_catalog_id)) {
                $retval = $this->nb_catalog_list->getItem($nb_catalog_id);
            } elseif ($nb_catalog_id !== null && $nb_catalog_id !== false) {
                throw new ENabuCoreException(
                    ENabuCoreException::ERROR_UNEXPECTED_PARAM_VALUE,
                    array('$nb_catalog', print_r($nb_catalog, true))
                );
            }
        }

        return $retval;
    }
public function getCatalog ( $ nb_catalog ) { $ retval = false ; if ( is_object ( $ nb_catalog ) && ! ( $ nb_catalog instanceof CNabuDataObject ) ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_UNEXPECTED_PARAM_CLASS_TYPE , array ( '$nb_catalog' , get_class ( $ nb_catalog ) ) ) ; } if ( $ nb_catalog !== null ) { $ nb_catalog_id = nb_getMixedValue ( $ nb_catalog , NABU_CATALOG_FIELD_ID ) ; if ( is_numeric ( $ nb_catalog_id ) || nb_isValidGUID ( $ nb_catalog_id ) ) { $ retval = $ this -> nb_catalog_list -> getItem ( $ nb_catalog_id ) ; } elseif ( $ nb_catalog_id !== null && $ nb_catalog_id !== false ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_UNEXPECTED_PARAM_VALUE , array ( '$nb_catalog' , print_r ( $ nb_catalog , true ) ) ) ; } } return $ retval ; }
Gets a Catalog by their ID.
If the internal Catalog List contains a instance with same ID returns this instance, else if not exists,
tries to locate it in the storage and, if exits, the load it, add into Catalog List and returns their
instance as result.
@param mixed $nb_catalog A CNabuDataObject instance containing a nb_catalog_id field or an ID.
@return CNabuCatalog Returns the Catalog instance if exists or false if not.
@throws ENabuCoreException Raises an exception if $nb_catalog has no valid value.
Gets a Catalog by their ID . If the internal Catalog List contains a instance with same ID returns this instance else if not exists tries to locate it in the storage and if exits the load it add into Catalog List and returns their instance as result .