ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAV\AbstractServer Class Reference
+ Inheritance diagram for Sabre\DAV\AbstractServer:
+ Collaboration diagram for Sabre\DAV\AbstractServer:

Public Member Functions

 setUp ()
 
 tearDown ()
 

Protected Member Functions

 getRootNode ()
 

Protected Attributes

 $response
 
 $request
 
 $server
 
 $tempDir = SABRE_TEMPDIR
 

Private Member Functions

 deleteTree ($path, $deleteRoot=true)
 

Detailed Description

Definition at line 7 of file AbstractServer.php.

Member Function Documentation

◆ deleteTree()

Sabre\DAV\AbstractServer::deleteTree (   $path,
  $deleteRoot = true 
)
private

Definition at line 47 of file AbstractServer.php.

References $path.

Referenced by Sabre\DAV\AbstractServer\setUp(), and Sabre\DAV\AbstractServer\tearDown().

47  {
48 
49  foreach (scandir($path) as $node) {
50 
51  if ($node == '.' || $node == '.svn' || $node == '..') continue;
52  $myPath = $path . '/' . $node;
53  if (is_file($myPath)) {
54  unlink($myPath);
55  } else {
56  $this->deleteTree($myPath);
57  }
58 
59  }
60  if ($deleteRoot) rmdir($path);
61 
62  }
$path
Definition: aliased.php:25
deleteTree($path, $deleteRoot=true)
+ Here is the caller graph for this function:

◆ getRootNode()

Sabre\DAV\AbstractServer::getRootNode ( )
protected

Definition at line 41 of file AbstractServer.php.

Referenced by Sabre\DAV\AbstractServer\setUp().

41  {
42 
43  return new FS\Directory(SABRE_TEMPDIR);
44 
45  }
+ Here is the caller graph for this function:

◆ setUp()

Sabre\DAV\AbstractServer::setUp ( )

Definition at line 20 of file AbstractServer.php.

References Sabre\DAV\AbstractServer\$response, Sabre\DAV\AbstractServer\deleteTree(), and Sabre\DAV\AbstractServer\getRootNode().

20  {
21 
22  $this->response = new HTTP\ResponseMock();
23  $this->server = new Server($this->getRootNode());
24  $this->server->sapi = new HTTP\SapiMock();
25  $this->server->httpResponse = $this->response;
26  $this->server->debugExceptions = true;
27  $this->deleteTree(SABRE_TEMPDIR, false);
28  file_put_contents(SABRE_TEMPDIR . '/test.txt', 'Test contents');
29  mkdir(SABRE_TEMPDIR . '/dir');
30  file_put_contents(SABRE_TEMPDIR . '/dir/child.txt', 'Child contents');
31 
32 
33  }
deleteTree($path, $deleteRoot=true)
+ Here is the call graph for this function:

◆ tearDown()

Sabre\DAV\AbstractServer::tearDown ( )

Definition at line 35 of file AbstractServer.php.

References Sabre\DAV\AbstractServer\deleteTree().

35  {
36 
37  $this->deleteTree(SABRE_TEMPDIR, false);
38 
39  }
deleteTree($path, $deleteRoot=true)
+ Here is the call graph for this function:

Field Documentation

◆ $request

Sabre\DAV\AbstractServer::$request
protected

Definition at line 13 of file AbstractServer.php.

Referenced by Sabre\DAV\Property\SupportedReportSetTest\sendPROPFIND(), Sabre\DAV\ServerPropsTest\sendRequest(), Sabre\DAV\ServerPropsInfiniteDepthTest\sendRequest(), Sabre\DAV\GetIfConditionsTest\test2Etags(), Sabre\DAV\GetIfConditionsTest\test2LockTokens(), Sabre\DAV\GetIfConditionsTest\test2UriLockTokens(), Sabre\DAV\GetIfConditionsTest\test2UriMultiLockTokens(), Sabre\DAV\ServerSimpleTest\testBaseUri(), Sabre\DAV\Browser\MapGetToPropFindTest\testCollectionGet(), Sabre\DAV\Browser\PluginTest\testCollectionGet(), Sabre\DAV\Browser\PluginTest\testCollectionGetIfNoneMatch(), Sabre\DAV\Browser\PluginTest\testCollectionGetRoot(), Sabre\DAV\GetIfConditionsTest\testComplexIf(), Sabre\DAV\FSExt\ServerTest\testDelete(), Sabre\DAV\FSExt\ServerTest\testDeleteDirectory(), Sabre\DAV\Locks\PluginTest\testDeleteWithETagOnCollection(), Sabre\DAV\Locks\PluginTest\testDoubleLock(), Sabre\DAV\GetIfConditionsTest\testEtag(), Sabre\DAV\FSExt\ServerTest\testGet(), Sabre\DAV\Browser\PluginTest\testGetAsset(), Sabre\DAV\Browser\PluginTest\testGetAsset404(), Sabre\DAV\Browser\PluginTest\testGetAssetEscapeBasePath(), Sabre\DAV\Browser\PluginTest\testGETPassthru(), Sabre\DAV\Locks\PluginTest\testGetTimeoutHeader(), Sabre\DAV\Locks\PluginTest\testGetTimeoutHeaderInfinite(), Sabre\DAV\Locks\PluginTest\testGetTimeoutHeaderInvalid(), Sabre\DAV\Locks\PluginTest\testGetTimeoutHeaderTwoItems(), Sabre\DAV\FSExt\ServerTest\testHEAD(), Sabre\DAV\Locks\PluginTest\testLock(), Sabre\DAV\Locks\PluginTest\testLockCopyLockDestination(), Sabre\DAV\Locks\PluginTest\testLockCopyLockSource(), Sabre\DAV\Locks\PluginTest\testLockDeleteParent(), Sabre\DAV\Locks\PluginTest\testLockDeleteSucceed(), Sabre\DAV\Locks\PluginTest\testLockMoveLockDestination(), Sabre\DAV\Locks\PluginTest\testLockMoveLockParent(), Sabre\DAV\Locks\PluginTest\testLockMoveLockSourceLocked(), Sabre\DAV\Locks\PluginTest\testLockMoveLockSourceSucceed(), Sabre\DAV\Locks\PluginTest\testLockNoBody(), Sabre\DAV\Locks\PluginTest\testLockNoFile(), Sabre\DAV\TemporaryFileFilterTest\testLockNonExistant(), Sabre\DAV\Locks\PluginTest\testLockPutBadToken(), Sabre\DAV\Locks\PluginTest\testLockPutGoodToken(), Sabre\DAV\Locks\PluginTest\testLockPutNoToken(), Sabre\DAV\Locks\PluginTest\testLockPutUnrelatedToken(), Sabre\DAV\Locks\PluginTest\testLockRefresh(), Sabre\DAV\Locks\PluginTest\testLockRefreshBadToken(), Sabre\DAV\Locks\PluginTest\testLockRetainOwner(), Sabre\DAV\GetIfConditionsTest\testLockToken(), Sabre\DAV\GetIfConditionsTest\testLockTokenUrl(), Sabre\DAV\ServerEventsTest\testMethod(), Sabre\DAV\ServerMKCOLTest\testMkcol(), Sabre\DAV\FSExt\ServerTest\testMkcol(), Sabre\DAV\ServerMKCOLTest\testMKCOLAlreadyExists(), Sabre\DAV\ServerMKCOLTest\testMKCOLAndProps(), Sabre\DAV\ServerMKCOLTest\testMKCOLBrokenXML(), Sabre\DAV\ServerMKCOLTest\testMKCOLIncorrectResourceType(), Sabre\DAV\ServerMKCOLTest\testMKCOLNoParent(), Sabre\DAV\ServerMKCOLTest\testMKCOLNoResourceType(), Sabre\DAV\ServerMKCOLTest\testMKCOLParentIsNoCollection(), Sabre\DAV\ServerMKCOLTest\testMKCOLSuccess(), Sabre\DAV\ServerMKCOLTest\testMKCOLUnknownBody(), Sabre\DAV\ServerMKCOLTest\testMKCOLUnknownXML(), Sabre\DAV\ServerMKCOLTest\testMKCOLWhiteSpaceResourceType(), Sabre\DAV\Mount\PluginTest\testMountResponse(), Sabre\DAV\FSExt\ServerTest\testMove(), Sabre\DAV\FSExt\ServerTest\testMoveOtherObject(), Sabre\DAV\GetIfConditionsTest\testNoConditions(), Sabre\DAV\ServerSimpleTest\testNonExistantMethod(), Sabre\DAV\GetIfConditionsTest\testNotLockToken(), Sabre\DAV\ServerSimpleTest\testOptions(), Sabre\DAV\ServerPluginTest\testOptions(), Sabre\DAV\FSExt\ServerTest\testOptions(), Sabre\DAV\ServerSimpleTest\testOptionsUnmapped(), Sabre\DAV\Mount\PluginTest\testPassThrough(), Sabre\DAV\Browser\PluginTest\testPostMkCol(), Sabre\DAV\Browser\PluginTest\testPostNoSabreAction(), Sabre\DAV\Browser\PluginTest\testPostOtherContentType(), Sabre\DAV\FSExt\ServerTest\testPut(), Sabre\DAV\FSExt\ServerTest\testPutAlreadyExists(), Sabre\DAV\TemporaryFileFilterTest\testPutDelete(), Sabre\DAV\TemporaryFileFilterTest\testPutGet(), Sabre\DAV\TemporaryFileFilterTest\testPutNormal(), Sabre\DAV\TemporaryFileFilterTest\testPutPropfind(), Sabre\DAV\TemporaryFileFilterTest\testPutTemp(), Sabre\DAV\TemporaryFileFilterTest\testPutTempIfNoneMatch(), Sabre\DAV\FSExt\ServerTest\testPutUpdate(), Sabre\DAV\Locks\PluginTest\testPutWithCorrectETag(), Sabre\DAV\Locks\PluginTest\testPutWithIncorrectETag(), Sabre\DAV\ServerSimpleTest\testReportIntercepted(), Sabre\DAV\ServerSimpleTest\testReportNotFound(), Sabre\DAV\Locks\PluginTest\testUnlock(), Sabre\DAV\Locks\PluginTest\testUnlockBadToken(), Sabre\DAV\Locks\PluginTest\testUnlockNoToken(), and Sabre\DAV\Locks\PluginTest\testUnlockWindowsBug().

◆ $response

◆ $server

◆ $tempDir

Sabre\DAV\AbstractServer::$tempDir = SABRE_TEMPDIR
protected

Definition at line 18 of file AbstractServer.php.


The documentation for this class was generated from the following file: