Search code examples
phpalfrescocmis

Alfresco CMIS in PHP


We have integrated Alfresco and PHP using CMIS. We have created custom content in alfresco called "my:content".

We are creating document from PHP to alfresco. Below is the code for creating content.

$client = new CMISService($repo_url, $repo_username, $repo_password);
$myfolder = $client->getObjectByPath($repo_folder);
$obs = $client->createDocument($myfolder->id, $repo_new_file,$prop, "THIS IS A NEW DOCUMENT", "text/plain");

I want to set custom property from PHP. Where I can set that type in PHP?

Thank You.


Solution

  • Set following property while creating document

    $prop = array('cmis:objectTypeId' => 'D:my:content');