Copyright © 2011 Kaltura Inc.
All Rights Reserved. Designated trademarks and brands are the property of their respective owners.
Use of this web site constitutes acceptance of the Terms of Use and Privacy Policy.
EduVideo.org
I've used action listAction to list kaltura users. Here is the code:
$pager = new KalturaFilterPager();
$pager->pageSize = 12;
$pager->pageIndex = 1;
$filter = new KalturaUserFilter();
$filter->orderBy = "-createdAt";
try
{
$u=$client->user->listAction($filter, $pager);
}
catch (Exception $ex)
{
$error = $ex->getMessage();
}
And I've got the error 'Invalid object type'. Then I've looked the client library KalturaClient.php, function listAction in class KalturaUserService and saw that
$this->client->validateObjectType($resultObject, "array");
but $resultObject was the object.
I replaced 'array' by 'object' and everything became fine.
Is there situations when $resultObject will be an array?
Well. I have a look validateObjectType function in KalturaClientBase.php and get a new result :)
There is no definiton of the classes KalturaUserListResponse and KalturaPlaylistListResponse in KalturaClient.php. That's why $resultObject in listAction function became '__PHP_Incomplete_Class Object'.
So, the result:
in class KalturaUserService, function listAction I wrote
$this->client->validateObjectType($resultObject, "KalturaUserListResponse");
and in class KalturaPlaylistService, function listAction
$this->client->validateObjectType($resultObject, "KalturaPlaylistListResponse");