コード例 #1
0
ファイル: PropPatchTest.php プロジェクト: sebbie42/casebox
 /**
  * @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();
 }
コード例 #2
0
ファイル: MkCol.php プロジェクト: sebbie42/casebox
 /**
  * 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);
 }
コード例 #3
0
ファイル: TreeTest.php プロジェクト: BlaBlaNet/hubzilla
 /**
  * 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);
 }