/** * @expectedException \UnexpectedValueException */ public function testHandleMultiValueBroken() { $propPatch = new PropPatch(['{DAV:}a' => 'foo', '{DAV:}b' => 'bar', '{DAV:}c' => null]); $calledA = false; $propPatch->handle(['{DAV:}a', '{DAV:}b', '{DAV:}c'], function ($properties) use(&$calledA) { return 'hi'; }); $propPatch->commit(); }
/** * Creates the MKCOL object. * * @param string[] $resourceType List of resourcetype values. * @param array $mutations List of new properties values. */ function __construct(array $resourceType, array $mutations) { $this->resourceType = $resourceType; parent::__construct($mutations); }
/** * Updates properties on this node. * * This method received a PropPatch object, which contains all the * information about the update. * * To update specific properties, call the 'handle' method on this object. * Read the PropPatch documentation for more information. * * @param array $mutations * @return bool|array */ function propPatch(PropPatch $propPatch) { $this->properties = $propPatch->getMutations(); $propPatch->setRemainingResultCode(200); }