|
@@ 485-507 (lines=23) @@
|
| 482 |
|
* @throws CmisInvalidArgumentException Throws an <code>CmisInvalidArgumentException</code> if empty |
| 483 |
|
* property list is given |
| 484 |
|
*/ |
| 485 |
|
public function createFolder( |
| 486 |
|
array $properties, |
| 487 |
|
ObjectIdInterface $folderId, |
| 488 |
|
array $policies = [], |
| 489 |
|
array $addAces = [], |
| 490 |
|
array $removeAces = [] |
| 491 |
|
) { |
| 492 |
|
if (empty($properties)) { |
| 493 |
|
throw new CmisInvalidArgumentException('Properties must not be empty!'); |
| 494 |
|
} |
| 495 |
|
|
| 496 |
|
$objectId = $this->getBinding()->getObjectService()->createFolder( |
| 497 |
|
$this->getRepositoryId(), |
| 498 |
|
$this->getObjectFactory()->convertProperties($properties), |
| 499 |
|
$folderId->getId(), |
| 500 |
|
$this->getObjectFactory()->convertPolicies($policies), |
| 501 |
|
$this->getObjectFactory()->convertAces($addAces), |
| 502 |
|
$this->getObjectFactory()->convertAces($removeAces), |
| 503 |
|
null |
| 504 |
|
); |
| 505 |
|
|
| 506 |
|
return $this->createObjectId($objectId); |
| 507 |
|
} |
| 508 |
|
|
| 509 |
|
/** |
| 510 |
|
* Creates a new item. |
|
@@ 521-543 (lines=23) @@
|
| 518 |
|
* @throws CmisInvalidArgumentException Throws an <code>CmisInvalidArgumentException</code> if empty |
| 519 |
|
* property list is given |
| 520 |
|
*/ |
| 521 |
|
public function createItem( |
| 522 |
|
array $properties, |
| 523 |
|
ObjectIdInterface $folderId, |
| 524 |
|
array $policies = [], |
| 525 |
|
array $addAces = [], |
| 526 |
|
array $removeAces = [] |
| 527 |
|
) { |
| 528 |
|
if (empty($properties)) { |
| 529 |
|
throw new CmisInvalidArgumentException('Properties must not be empty!'); |
| 530 |
|
} |
| 531 |
|
|
| 532 |
|
$objectId = $this->getBinding()->getObjectService()->createItem( |
| 533 |
|
$this->getRepositoryId(), |
| 534 |
|
$this->getObjectFactory()->convertProperties($properties), |
| 535 |
|
$folderId->getId(), |
| 536 |
|
$this->getObjectFactory()->convertPolicies($policies), |
| 537 |
|
$this->getObjectFactory()->convertAces($addAces), |
| 538 |
|
$this->getObjectFactory()->convertAces($removeAces), |
| 539 |
|
null |
| 540 |
|
); |
| 541 |
|
|
| 542 |
|
return $this->createObjectId($objectId); |
| 543 |
|
} |
| 544 |
|
|
| 545 |
|
/** |
| 546 |
|
* Creates an object ID from a String. |