Permalink
Browse files

PHPDocs

  • Loading branch information...
1 parent 1de3ac8 commit 10ee1516414fc195f9001347f62c3d9917e77b44 @cdujeu cdujeu committed Sep 12, 2016
Showing with 1,352 additions and 28 deletions.
  1. +5 −1 core/src/plugins/access.ajxp_home/HomePagePlugin.php
  2. +13 −0 core/src/plugins/access.ajxp_user/UserDashboardDriver.php
  3. +7 −0 core/src/plugins/access.demo/DemoAccessDriver.php
  4. +11 −0 core/src/plugins/access.dropbox/src/Driver.php
  5. +108 −6 core/src/plugins/access.fs/FsAccessWrapper.php
  6. +3 −0 core/src/plugins/access.fs/test.fsAccess.php
  7. +138 −0 core/src/plugins/access.ftp/FtpAccessWrapper.php
  8. +7 −0 core/src/plugins/access.ftp/test.ftpAccess.php
  9. +5 −0 core/src/plugins/access.inbox/InboxAccessWrapper.php
  10. +4 −0 core/src/plugins/access.s3/S3AccessWrapper.php
  11. +6 −0 core/src/plugins/access.s3/S3CacheService.php
  12. +4 −0 core/src/plugins/access.s3/S3Client.php
  13. +13 −1 core/src/plugins/access.sftp/SFTPAccessDriver.php
  14. +30 −0 core/src/plugins/access.sftp/SFTPAccessWrapper.php
  15. +5 −0 core/src/plugins/access.sftp_psl/SftpPSLAccessDriver.php
  16. +13 −0 core/src/plugins/access.sftp_psl/SftpPSLAccessWrapper.php
  17. +10 −0 core/src/plugins/access.smb/SMBAccessDriver.php
  18. +24 −1 core/src/plugins/access.smb/SMBAccessWrapper.php
  19. +8 −0 core/src/plugins/access.swift/SwiftAccessDriver.php
  20. +31 −0 core/src/plugins/access.swift/SwiftAccessWrapper.php
  21. +4 −0 core/src/plugins/access.webdav/src/Driver.php
  22. +9 −0 core/src/plugins/access.wms/WmsBrowser.php
  23. +10 −1 core/src/plugins/action.share/src/Model/CompositeShare.php
  24. +38 −2 core/src/plugins/action.share/src/Model/ShareLink.php
  25. +5 −0 core/src/plugins/action.share/src/Store/ShareMetaManager.php
  26. +5 −0 core/src/plugins/auth.ldap/LdapAuthDriver.php
  27. +49 −0 core/src/plugins/auth.radius/RadiusAuthDriver.php
  28. +25 −0 core/src/plugins/auth.remote/cms_auth_functions.php
  29. +7 −0 core/src/plugins/auth.remote/glueCode.php
  30. +31 −5 core/src/plugins/authfront.cyphered/CypheredAuthFrontend.php
  31. +4 −1 core/src/plugins/authfront.http_basic/BasicHttpAuthFrontend.php
  32. +9 −0 core/src/plugins/conf.sql/SqlUser.php
  33. +1 −5 core/src/plugins/core.access/src/AbstractAccessDriver.php
  34. +3 −0 core/src/plugins/core.access/src/Filter/AJXP_Permission.php
  35. +3 −0 core/src/plugins/core.access/src/Filter/AJXP_PermissionMask.php
  36. +11 −0 core/src/plugins/core.access/src/Filter/ContentFilter.php
  37. +11 −0 core/src/plugins/core.access/src/Model/NodesDiff.php
  38. +10 −0 core/src/plugins/core.access/src/Model/UserSelection.php
  39. +3 −0 core/src/plugins/core.access/src/RecycleBinManager.php
  40. +12 −0 core/src/plugins/core.access/src/Stream/AuthStream.php
  41. +4 −0 core/src/plugins/core.access/src/Stream/Iterator/DirIterator.php
  42. +10 −0 core/src/plugins/core.access/src/Stream/Listener/AuthSubscriber.php
  43. +15 −0 core/src/plugins/core.access/src/Stream/MetadataCachingStream.php
  44. +15 −0 core/src/plugins/core.access/src/Stream/OAuthStream.php
  45. +29 −0 core/src/plugins/core.access/src/Stream/PydioStreamWrapper.php
  46. +78 −0 core/src/plugins/core.access/src/Stream/Stream.php
  47. +69 −0 core/src/plugins/core.access/src/Stream/StreamWrapper.php
  48. +3 −0 core/src/plugins/core.access/src/Stream/WriteBufferStream.php
  49. +7 −0 core/src/plugins/core.auth/MemorySafe.php
  50. +4 −0 core/src/plugins/core.authfront/AbstractAuthFrontend.php
  51. +4 −0 core/src/plugins/core.authfront/FrontendsLoader.php
  52. +32 −2 core/src/plugins/core.cache/CacheStreamLayer.php
  53. +47 −0 core/src/plugins/core.conf/AJXP_Role.php
  54. +8 −1 core/src/plugins/core.conf/AjxpRole.php
  55. +21 −0 core/src/plugins/core.notifications/IFeedStore.php
  56. +11 −0 core/src/plugins/core.ocs/src/ActionsController.php
  57. +22 −0 core/src/plugins/core.ocs/src/Client/IFederated.php
  58. +12 −0 core/src/plugins/core.ocs/src/Client/IServiceDiscovery.php
  59. +4 −0 core/src/plugins/core.ocs/src/Client/OCSClient.php
  60. +4 −0 core/src/plugins/core.ocs/src/Model/IStore.php
  61. +10 −0 core/src/plugins/core.ocs/src/Model/RemoteShare.php
  62. +22 −0 core/src/plugins/core.ocs/src/Model/SQLStore.php
  63. +10 −0 core/src/plugins/core.ocs/src/Model/ShareInvitation.php
  64. +10 −0 core/src/plugins/core.ocs/src/Model/TargettedLink.php
  65. +32 −0 core/src/plugins/core.ocs/src/OCSPlugin.php
  66. +4 −0 core/src/plugins/core.ocs/src/Server/Dav/AuthSharingBackend.php
  67. +9 −0 core/src/plugins/core.ocs/src/Server/Dav/BasicAuthNoPass.php
  68. +7 −1 core/src/plugins/core.ocs/src/Server/Dummy.php
  69. +37 −0 core/src/plugins/core.ocs/src/Server/Federated/Server.php
  70. +8 −0 core/src/plugins/core.ocs/src/Server/InvalidArgumentsException.php
  71. +8 −0 core/src/plugins/core.ocs/src/Server/UserNotFoundException.php
  72. +4 −0 core/src/plugins/core.tasks/src/Providers/MockTasksProvider.php
  73. +14 −0 core/src/plugins/core.tasks/src/TaskController.php
  74. +5 −1 core/src/plugins/core.tasks/src/TaskListMessage.php
  75. +37 −0 core/src/plugins/cypher.encfs/EncfsMounter.php
  76. +34 −0 core/src/plugins/log.sql/SqlLogDriver.php
  77. +7 −0 core/src/runTests.php
@@ -33,7 +33,11 @@
*/
class HomePagePlugin extends AbstractAccessDriver
{
-
+
+ /**
+ * @param ContextInterface $ctx
+ * @param \DOMNode $contribNode
+ */
public function parseSpecificContributions(ContextInterface $ctx, \DOMNode &$contribNode){
parent::parseSpecificContributions($ctx, $contribNode);
if($contribNode->nodeName == "client_configs"){
@@ -58,6 +58,10 @@ protected function initRepository(ContextInterface $contextInterface)
require_once AJXP_INSTALL_PATH . "/" . AJXP_PLUGINS_FOLDER . "/action.share/vendor/autoload.php";
}
+ /**
+ * @param ContextInterface $ctx
+ * @param \DOMNode $contribNode
+ */
public function parseSpecificContributions(ContextInterface $ctx, \DOMNode &$contribNode){
$disableAddressBook = $this->getContextualOption($ctx, "DASH_DISABLE_ADDRESS_BOOK") === true;
if($contribNode->nodeName == "client_configs" && $disableAddressBook){
@@ -70,6 +74,11 @@ public function parseSpecificContributions(ContextInterface $ctx, \DOMNode &$con
parent::parseSpecificContributions($ctx, $contribNode);
}
+ /**
+ * @param ServerRequestInterface $requestInterface
+ * @param ResponseInterface $responseInterface
+ * @throws \Exception
+ */
public function switchAction(ServerRequestInterface $requestInterface, ResponseInterface &$responseInterface)
{
parent::accessPreprocess($requestInterface);
@@ -196,6 +205,10 @@ public function listMinisites(ContextInterface $ctx)
return $minisites;
}
+ /**
+ * @param $metaIcon
+ * @return string
+ */
private function metaIcon($metaIcon)
{
return "<span class='icon-".$metaIcon." meta-icon'></span> ";
@@ -42,6 +42,13 @@ class DemoAccessDriver extends FsAccessDriver
*/
public $repository;
+ /**
+ * @param ServerRequestInterface $request
+ * @param ResponseInterface $response
+ * @throws PydioException
+ * @throws \Exception
+ * @return array|void
+ */
public function switchAction(ServerRequestInterface &$request, ResponseInterface &$response)
{
$errorMessage = "This is a demo, all 'write' actions are disabled!";
@@ -82,6 +82,12 @@ protected function initRepository(ContextInterface $context)
return true;
}
+ /**
+ * @param ServerRequestInterface $request
+ * @param ResponseInterface $response
+ * @throws \Exception
+ * @throws \Pydio\Core\Exception\PydioException
+ */
public function switchAction(ServerRequestInterface &$request, ResponseInterface &$response) {
$httpVars = $request->getParsedBody();
@@ -116,6 +122,11 @@ public static function convertPath(AJXP_Node $node) {
return "";
}
+ /**
+ * @param $key
+ * @param $value
+ * @return string
+ */
public static function convertToJSON($key, $value) {
$key = '' . $key->getName();
$value = '' . $value;
@@ -212,6 +212,10 @@ public static function getResolvedOptionsForNode($node)
];
}
+ /**
+ * @param string $tmpDir
+ * @param string $tmpFile
+ */
public static function removeTmpFile($tmpDir, $tmpFile)
{
if(is_file($tmpFile)) unlink($tmpFile);
@@ -229,34 +233,50 @@ protected static function closeWrapper()
}
}
+ /**
+ * @param string $path
+ * @param bool $persistent
+ * @return mixed
+ * @throws PydioException
+ * @throws \Exception
+ */
public static function getRealFSReference($path, $persistent = false)
{
- $contextOpened =false;
if (self::$crtZip != null) {
- $contextOpened = true;
$crtZip = self::$crtZip;
self::$crtZip = null;
}
$realPath = self::initPath($path, "file");
- if (!$contextOpened) {
- self::closeWrapper();
- } else {
+ if (isSet($crtZip)) {
self::$crtZip = $crtZip;
+ } else {
+ self::closeWrapper();
}
return $realPath;
}
+ /**
+ * @return bool
+ */
public static function isRemote()
{
return false;
}
+ /**
+ * @param String $url
+ * @return bool
+ */
public static function isSeekable($url)
{
if(strpos($url, ".zip/") !== false) return false;
return true;
}
+ /**
+ * @param string $path
+ * @param resource $stream
+ */
public static function copyFileInStream($path, $stream)
{
$fp = fopen(self::getRealFSReference($path), "rb");
@@ -269,6 +289,12 @@ public static function copyFileInStream($path, $stream)
fclose($fp);
}
+ /**
+ * @param string $path
+ * @param number $chmodValue
+ * @throws PydioException
+ * @throws \Exception
+ */
public static function changeMode($path, $chmodValue)
{
$realPath = self::initPath($path, "file");
@@ -301,16 +327,27 @@ public function stream_open($path, $mode, $options, &$context)
}
}
+ /**
+ * @param int $offset
+ * @param int $whence
+ * @return bool
+ */
public function stream_seek($offset , $whence = SEEK_SET)
{
- fseek($this->fp, $offset, $whence);
+ return fseek($this->fp, $offset, $whence);
}
+ /**
+ * @return int
+ */
public function stream_tell()
{
return ftell($this->fp);
}
+ /**
+ * @return array|mixed|null
+ */
public function stream_stat()
{
$PROBE_REAL_SIZE = ConfService::getConf("PROBE_REAL_SIZE");
@@ -331,6 +368,13 @@ public function stream_stat()
return null;
}
+ /**
+ * @param string $path
+ * @param int $flags
+ * @return array|null
+ * @throws PydioException
+ * @throws \Exception
+ */
public function url_stat($path, $flags)
{
// File and zip case
@@ -384,22 +428,40 @@ public function url_stat($path, $flags)
return null;
}
+ /**
+ * @param string $from
+ * @param string $to
+ * @return bool
+ * @throws PydioException
+ * @throws \Exception
+ */
public function rename($from, $to)
{
return rename($this->initPath($from, "file", false, true), $this->initPath($to, "file", false, true));
}
+ /**
+ * @param int $count
+ * @return string
+ */
public function stream_read($count)
{
return fread($this->fp, $count);
}
+ /**
+ * @param string $data
+ * @return int
+ */
public function stream_write($data)
{
fwrite($this->fp, $data, strlen($data));
return strlen($data);
}
+ /**
+ * @return bool
+ */
public function stream_eof()
{
return feof($this->fp);
@@ -412,25 +474,49 @@ public function stream_close()
}
}
+ /**
+ *
+ */
public function stream_flush()
{
if (isSet($this->fp) && $this->fp!=-1 && $this->fp!==false) {
fflush($this->fp);
}
}
+ /**
+ * @param string $path
+ * @return bool
+ * @throws PydioException
+ * @throws \Exception
+ */
public function unlink($path)
{
$this->realPath = $this->initPath($path, "file", false, true);
return unlink($this->realPath);
}
+ /**
+ * @param string $path
+ * @param int $options
+ * @return bool
+ * @throws PydioException
+ * @throws \Exception
+ */
public function rmdir($path, $options)
{
$this->realPath = $this->initPath($path, "file", false, true);
return rmdir($this->realPath);
}
+ /**
+ * @param string $path
+ * @param int $mode
+ * @param int $options
+ * @return bool
+ * @throws PydioException
+ * @throws \Exception
+ */
public function mkdir($path, $mode, $options)
{
return mkdir($this->initPath($path, "file"), $mode);
@@ -453,6 +539,10 @@ public function dir_opendir ($path , $options )
}
return $this->dH !== false;
}
+
+ /**
+ * Close dir handle
+ */
public function dir_closedir ()
{
$this->closeWrapper();
@@ -462,6 +552,10 @@ public function dir_closedir ()
closedir($this->dH);
}
}
+
+ /**
+ * @return bool|string
+ */
public function dir_readdir ()
{
if ($this->dH == -1) {
@@ -475,6 +569,10 @@ public function dir_readdir ()
return readdir($this->dH);
}
}
+
+ /**
+ *
+ */
public function dir_rewinddir ()
{
if ($this->dH == -1) {
@@ -493,6 +591,10 @@ public static function getLastRealSize()
return self::$lastRealSize;
}
+ /**
+ * @param $file
+ * @return float|string
+ */
protected function getTrueSizeOnFileSystem($file)
{
if (!(strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')) {
@@ -32,6 +32,9 @@
*/
class fsAccessTest extends AbstractTest
{
+ /**
+ * fsAccessTest constructor.
+ */
public function __construct() { parent::__construct("Filesystem Plugin", ""); }
/**
Oops, something went wrong.

0 comments on commit 10ee151

Please sign in to comment.