public function KalturaClientBase::validateObjectType in Kaltura 6.2
* Validate that the passed object type is of the expected type * *
Parameters
unknown_type $resultObject: * @param unknown_type $objectType
File
- kaltura_client/
KalturaClientBase.php, line 330
Class
Code
public function validateObjectType($resultObject, $objectType) {
if (is_object($resultObject)) {
if (!$resultObject instanceof $objectType) {
throw new Exception("Invalid object type");
}
}
else {
if (gettype($resultObject) !== "NULL" && gettype($resultObject) !== $objectType) {
throw new Exception("Invalid object type");
}
}
}