📝 Change return type for \MetaModel::GetObject

This commit is contained in:
Pierre Goiffon
2019-05-28 12:17:29 +02:00
parent 12c916f4e5
commit 3791b2dd24

View File

@@ -6665,20 +6665,21 @@ abstract class MetaModel
* Instantiate an object already persisted to the Database. * Instantiate an object already persisted to the Database.
* *
* @api * @api
* @see MetaModel::GetObjectWithArchive to get object even if it's archived
* @see utils::PushArchiveMode() to enable search on archived objects
*
* @param string $sClass * @param string $sClass
* @param int $iKey id value of the object to retrieve * @param int $iKey id value of the object to retrieve
* @param bool $bMustBeFound see throws ArchivedObjectException * @param bool $bMustBeFound see throws ArchivedObjectException
* @param bool $bAllowAllData if true then user rights will be bypassed - use with care! * @param bool $bAllowAllData if true then user rights will be bypassed - use with care!
* @param null $aModifierProperties * @param null $aModifierProperties
* *
* @return DBObject|null null if : (the object is not found) or (archive mode disabled and object is archived and * @return \cmdbAbstractObject null if : (the object is not found) or (archive mode disabled and object is archived and
* $bMustBeFound=false) * $bMustBeFound=false)
* @throws CoreException if no result found and $bMustBeFound=true * @throws CoreException if no result found and $bMustBeFound=true
* @throws ArchivedObjectException if archive mode disabled and result is archived and $bMustBeFound=true * @throws ArchivedObjectException if archive mode disabled and result is archived and $bMustBeFound=true
* @throws \Exception * @throws \Exception
* *
* @see MetaModel::GetObjectWithArchive to get object even if it's archived
* @see utils::PushArchiveMode() to enable search on archived objects
*/ */
public static function GetObject($sClass, $iKey, $bMustBeFound = true, $bAllowAllData = false, $aModifierProperties = null) public static function GetObject($sClass, $iKey, $bMustBeFound = true, $bAllowAllData = false, $aModifierProperties = null)
{ {