public function getIContact($nb_icontact)
    {
        $retval = false;

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

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

        return $retval;
    }
public function getIContact($nb_icontact)
    {
        $retval = false;

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

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

        return $retval;
    }
public function getIContact ( $ nb_icontact ) { $ retval = false ; if ( is_object ( $ nb_icontact ) && ! ( $ nb_icontact instanceof CNabuDataObject ) ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_UNEXPECTED_PARAM_CLASS_TYPE , array ( '$nb_icontact' , get_class ( $ nb_icontact ) ) ) ; } if ( $ nb_icontact !== null ) { $ nb_icontact_id = nb_getMixedValue ( $ nb_icontact , NABU_ICONTACT_FIELD_ID ) ; if ( is_numeric ( $ nb_icontact_id ) || nb_isValidGUID ( $ nb_icontact_id ) ) { $ retval = $ this -> nb_icontact_list -> getItem ( $ nb_icontact_id ) ; } elseif ( $ nb_icontact_id !== null && $ nb_icontact_id !== false ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_UNEXPECTED_PARAM_VALUE , array ( print_r ( $ nb_icontact , true ) , '$nb_icontact' ) ) ; } } return $ retval ; }
Gets an i-Contact by their ID.
If the internal i-Contact 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 i-Contact List and returns their
instance as result.
@param mixed $nb_icontact A CNabuDataObject instance containing a nb_icontact_id field or an ID.
@return CNabuIContact Returns the i-Contact instance if exists or false if not.
@throws ENabuCoreException Raises an exception if $nb_icontact has no valid value.
Gets an i - Contact by their ID . If the internal i - Contact 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 i - Contact List and returns their instance as result .