Permalink
Browse files

Php Docs, Copyright, Unused Imports

  • Loading branch information...
1 parent be95f98 commit f8bc62978dd3a7f0c985ab02e128bbf7675dddb2 @cdujeu cdujeu committed Sep 12, 2016
Showing with 682 additions and 183 deletions.
  1. +1 −1 core/src/core/src/phpunit/AJXP/Tests/Atomics/FiltersTest.php
  2. +1 −1 core/src/core/src/phpunit/AJXP/Tests/Atomics/MemStoresTest.php
  3. +1 −1 core/src/core/src/phpunit/AJXP/Tests/Atomics/RolesTest.php
  4. +1 −1 core/src/core/src/phpunit/AJXP/Tests/Atomics/UtilsTest.php
  5. +1 −1 core/src/core/src/phpunit/AJXP/Tests/Core/StoragesTest.php
  6. +1 −1 core/src/core/src/phpunit/AJXP/Tests/Core/UsersTests.php
  7. +1 −1 core/src/core/src/phpunit/AJXP/Tests/Suite/Atomics.php
  8. +1 −1 core/src/core/src/phpunit/AJXP/Tests/Suite/CoreStorages.php
  9. +1 −1 core/src/core/src/pydio/Core/Controller/Controller.php
  10. +1 −1 core/src/core/src/pydio/Core/Controller/HTMLWriter.php
  11. +1 −1 core/src/core/src/pydio/Core/Controller/ProgressBarCLI.php
  12. +35 −19 core/src/core/src/pydio/Core/Controller/ShutdownScheduler.php
  13. +1 −1 core/src/core/src/pydio/Core/Controller/UnixProcess.php
  14. +1 −1 core/src/core/src/pydio/Core/Controller/XMLWriter.php
  15. +9 −1 core/src/core/src/pydio/Core/Exception/ActionNotFoundException.php
  16. +7 −2 core/src/core/src/pydio/Core/Exception/DBConnectionException.php
  17. +4 −0 core/src/core/src/pydio/Core/Exception/LoginException.php
  18. +7 −0 core/src/core/src/pydio/Core/Exception/NoActiveWorkspaceException.php
  19. +23 −4 core/src/core/src/pydio/Core/Exception/PydioException.php
  20. +1 −1 core/src/core/src/pydio/Core/Exception/PydioPromptException.php
  21. +4 −2 core/src/core/src/pydio/Core/Exception/PydioUserAlertException.php
  22. +8 −1 core/src/core/src/pydio/Core/Exception/WorkspaceForbiddenException.php
  23. +8 −1 core/src/core/src/pydio/Core/Exception/WorkspaceNotFoundException.php
  24. +0 −2 core/src/core/src/pydio/Core/Http/Cli/AuthCliMiddleware.php
  25. +5 −0 core/src/core/src/pydio/Core/Http/Cli/CliMiddleware.php
  26. +4 −1 core/src/core/src/pydio/Core/Http/Cli/CliServer.php
  27. +9 −0 core/src/core/src/pydio/Core/Http/Cli/FreeArgvOptions.php
  28. +12 −0 core/src/core/src/pydio/Core/Http/Cli/FreeDefOptions.php
  29. +1 −1 core/src/core/src/pydio/Core/Http/Dav/AuthBackendBasic.php
  30. +1 −1 core/src/core/src/pydio/Core/Http/Dav/AuthBackendDigest.php
  31. +1 −1 core/src/core/src/pydio/Core/Http/Dav/BrowserPlugin.php
  32. +1 −1 core/src/core/src/pydio/Core/Http/Dav/Collection.php
  33. +11 −4 core/src/core/src/pydio/Core/Http/Dav/Node.php
  34. +1 −1 core/src/core/src/pydio/Core/Http/Dav/NodeLeaf.php
  35. +14 −4 core/src/core/src/pydio/Core/Http/Dav/RootCollection.php
  36. +12 −0 core/src/core/src/pydio/Core/Http/Message/BgActionTrigger.php
  37. +11 −1 core/src/core/src/pydio/Core/Http/Message/LoggingResult.php
  38. +21 −1 core/src/core/src/pydio/Core/Http/Message/Message.php
  39. +11 −2 core/src/core/src/pydio/Core/Http/Message/ReloadMessage.php
  40. +19 −0 core/src/core/src/pydio/Core/Http/Message/UserMessage.php
  41. +12 −1 core/src/core/src/pydio/Core/Http/Message/XMLDocMessage.php
  42. +4 −0 core/src/core/src/pydio/Core/Http/Message/XMLMessage.php
  43. +5 −4 core/src/core/src/pydio/Core/Http/Middleware/AuthMiddleware.php
  44. +4 −0 core/src/core/src/pydio/Core/Http/Middleware/ITopLevelMiddleware.php
  45. +18 −2 core/src/core/src/pydio/Core/Http/Middleware/SessionMiddleware.php
  46. +0 −1 core/src/core/src/pydio/Core/Http/Middleware/SessionRepositoryMiddleware.php
  47. +5 −2 core/src/core/src/pydio/Core/Http/Response/AsyncResponseStream.php
  48. +0 −1 core/src/core/src/pydio/Core/Http/Response/FileReaderResponse.php
  49. +5 −1 core/src/core/src/pydio/Core/Http/Response/JSONSerializableResponseChunk.php
  50. +5 −0 core/src/core/src/pydio/Core/Http/Response/SerializableResponseChunk.php
  51. +8 −0 core/src/core/src/pydio/Core/Http/Response/XMLDocSerializableResponseChunk.php
  52. +5 −3 core/src/core/src/pydio/Core/Http/Response/XMLSerializableResponseChunk.php
  53. +7 −1 core/src/core/src/pydio/Core/Http/Rest/ApiRouter.php
  54. +14 −1 core/src/core/src/pydio/Core/Http/Rest/RestApiMiddleware.php
  55. +10 −2 core/src/core/src/pydio/Core/Http/Rest/RestApiServer.php
  56. +30 −2 core/src/core/src/pydio/Core/Http/SimpleRestResourceRouter.php
  57. +14 −2 core/src/core/src/pydio/Core/Http/Wopi/RestWopiMiddleware.php
  58. +5 −0 core/src/core/src/pydio/Core/Http/Wopi/WopiRouter.php
  59. +17 −1 core/src/core/src/pydio/Core/Model/Context.php
  60. +4 −3 core/src/core/src/pydio/Core/Model/ContextInterface.php
  61. +5 −0 core/src/core/src/pydio/Core/Model/ContextProviderInterface.php
  62. +11 −1 core/src/core/src/pydio/Core/Model/FilteredRepositoriesList.php
  63. +4 −1 core/src/core/src/pydio/Core/PluginFramework/CoreInstanceProvider.php
  64. +1 −1 core/src/core/src/pydio/Core/PluginFramework/Plugin.php
  65. +1 −1 core/src/core/src/pydio/Core/PluginFramework/PluginsService.php
  66. +1 −1 core/src/core/src/pydio/Core/PluginFramework/SqlTableProvider.php
  67. +0 −1 core/src/core/src/pydio/Core/Serializer/RepositoryXML.php
  68. +0 −2 core/src/core/src/pydio/Core/Services/ApiKeysService.php
  69. +1 −1 core/src/core/src/pydio/Core/Services/AuthService.php
  70. +1 −1 core/src/core/src/pydio/Core/Services/CacheService.php
  71. +1 −1 core/src/core/src/pydio/Core/Services/ConfService.php
  72. +1 −1 core/src/core/src/pydio/Core/Services/LocalCache.php
  73. +4 −1 core/src/core/src/pydio/Core/Services/RepositoriesCache.php
  74. +1 −1 core/src/core/src/pydio/Core/Utils/Http/CaptchaProvider.php
  75. +6 −2 core/src/core/src/pydio/Core/Utils/Reflection/JSPacker.php
  76. +15 −9 core/src/core/src/pydio/Core/Utils/Reflection/PydioSdkGenerator.php
  77. +1 −2 core/src/core/src/pydio/Core/Utils/TextEncoder.php
  78. +0 −1 core/src/core/src/pydio/Core/Utils/Vars/InputFilter.php
  79. +0 −2 core/src/core/src/pydio/Core/Utils/Vars/OptionsHelper.php
  80. +1 −1 core/src/core/src/pydio/Core/Utils/Vars/VarsFilter.php
  81. +7 −1 core/src/core/src/pydio/Tests/AbstractTest.php
  82. +11 −5 core/src/core/src/pydio/Tests/Client.php
  83. +1 −1 core/src/core/src/pydio/Tests/PHPCLI.php
  84. +10 −3 core/src/core/src/pydio/Tests/PHPDomXML.php
  85. +14 −4 core/src/core/src/pydio/Tests/PHPErrorLevel.php
  86. +10 −3 core/src/core/src/pydio/Tests/PHPExif.php
  87. +10 −3 core/src/core/src/pydio/Tests/PHPGDVersion.php
  88. +10 −3 core/src/core/src/pydio/Tests/PHPLimits.php
  89. +10 −3 core/src/core/src/pydio/Tests/PHPMCrypt.php
  90. +10 −3 core/src/core/src/pydio/Tests/PHPOS.php
  91. +10 −3 core/src/core/src/pydio/Tests/PHPSession.php
  92. +10 −3 core/src/core/src/pydio/Tests/PHPVersion.php
  93. +9 −3 core/src/core/src/pydio/Tests/PHP_APC.php
  94. +10 −3 core/src/core/src/pydio/Tests/PHP_OB.php
  95. +10 −4 core/src/core/src/pydio/Tests/PHP_file_uploads.php
  96. +10 −3 core/src/core/src/pydio/Tests/PHP_magic_quotes.php
  97. +11 −5 core/src/core/src/pydio/Tests/{AJXPVersion.php → PydioVersion.php}
  98. +9 −1 core/src/core/src/pydio/Tests/SSLEncryption.php
  99. +10 −3 core/src/core/src/pydio/Tests/ServerEncoding.php
  100. +1 −1 core/src/core/src/pydio/Tests/Upload.php
  101. +1 −1 core/src/core/src/pydio/Tests/UsersConfig.php
  102. +9 −1 core/src/core/src/pydio/Tests/Writeability.php
  103. +9 −1 core/src/core/src/pydio/Tests/Zlib.php
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -47,12 +47,20 @@ public static function getInstance()
return self::$instance;
}
- public function __construct()
- {
- $this->callbacks = array();
- register_shutdown_function(array($this, 'callRegisteredShutdown'));
- ob_start();
- }
+ /**
+ * ShutdownScheduler constructor.
+ */
+ public function __construct()
+ {
+ $this->callbacks = array();
+ register_shutdown_function(array($this, 'callRegisteredShutdown'));
+ ob_start();
+ }
+
+ /**
+ * @return bool
+ * @throws \Exception
+ */
public function registerShutdownEventArray()
{
$callback = func_get_args();
@@ -71,20 +79,28 @@ public function registerShutdownEventArray()
$this->callbacks[] = $flattenArray;
return true;
}
- public function registerShutdownEvent()
- {
- $callback = func_get_args();
- if (empty($callback)) {
- throw new \Exception('No callback passed to '.__FUNCTION__.' method');
- }
- if (!is_callable($callback[0])) {
- throw new \Exception('Invalid callback ('.$callback[0].') passed to the '.__FUNCTION__.' method');
- }
- $this->callbacks[] = $callback;
- return true;
- }
+ /**
+ * @return bool
+ * @throws \Exception
+ */
+ public function registerShutdownEvent()
+ {
+ $callback = func_get_args();
+
+ if (empty($callback)) {
+ throw new \Exception('No callback passed to '.__FUNCTION__.' method');
+ }
+ if (!is_callable($callback[0])) {
+ throw new \Exception('Invalid callback ('.$callback[0].') passed to the '.__FUNCTION__.' method');
+ }
+ $this->callbacks[] = $callback;
+ return true;
+ }
+ /**
+ * Trigger the schedulers
+ */
public function callRegisteredShutdown()
{
session_write_close();
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>, Cyril Russo
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>, Cyril Russo
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -22,9 +22,17 @@
defined('AJXP_EXEC') or die('Access not allowed');
-
+/**
+ * Class ActionNotFoundException
+ * Exception thrown when a requests is calling an unknown (or disabled) action.
+ * @package Pydio\Core\Exception
+ */
class ActionNotFoundException extends PydioException
{
+ /**
+ * ActionNotFoundException constructor.
+ * @param string $action
+ */
public function __construct($action)
{
parent::__construct("Could not find action ".$action, null);
@@ -22,10 +22,15 @@
defined('AJXP_EXEC') or die('Access not allowed');
-
-
+/**
+ * Class DBConnectionException
+ * @package Pydio\Core\Exception
+ */
class DBConnectionException extends PydioException
{
+ /**
+ * DBConnectionException constructor.
+ */
public function __construct()
{
$messageString = "There was an error trying to connect to your database! Did you change any configuration for the core connection? Or maybe your database is down?";
@@ -23,6 +23,10 @@
defined('AJXP_EXEC') or die('Access not allowed');
+/**
+ * Class LoginException
+ * @package Pydio\Core\Exception
+ */
class LoginException extends PydioException
{
private $loginError;
@@ -23,8 +23,15 @@
defined('AJXP_EXEC') or die('Access not allowed');
+/**
+ * Class NoActiveWorkspaceException
+ * @package Pydio\Core\Exception
+ */
class NoActiveWorkspaceException extends PydioException
{
+ /**
+ * NoActiveWorkspaceException constructor.
+ */
public function __construct()
{
parent::__construct("No active workspace found for user!", false, 423);
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -24,15 +24,21 @@
use Pydio\Core\Services\LocaleService;
defined('AJXP_EXEC') or die( 'Access not allowed');
+
/**
- * Custom exception (legacy from php4 when there were no exceptions)
- * @package Pydio
- * @subpackage Core
+ * Class PydioException
+ * @package Pydio\Core\Exception
*/
class PydioException extends \Exception
{
private $errorCode;
+ /**
+ * PydioException constructor.
+ * @param string $messageString
+ * @param bool $messageId
+ * @param null $errorCode
+ */
public function __construct($messageString, $messageId = false, $errorCode = null)
{
if ($messageId !== false && class_exists("ConfService")) {
@@ -49,6 +55,10 @@ public function __construct($messageString, $messageId = false, $errorCode = nul
parent::__construct($messageString);
}
+ /**
+ * @param $mixed
+ * @throws PydioException
+ */
public function errorToXml($mixed)
{
if ($mixed instanceof \Exception) {
@@ -58,14 +68,23 @@ public function errorToXml($mixed)
}
}
+ /**
+ * @return bool
+ */
public function hasErrorCode(){
return isSet($this->errorCode);
}
+ /**
+ * @return null
+ */
public function getErrorCode(){
return $this->errorCode;
}
+ /**
+ * @return string
+ */
public static function buildDebugBackTrace(){
$message = "";
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
+ * Copyright 2007-2016 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
@@ -20,10 +20,12 @@
*/
namespace Pydio\Core\Exception;
-
-
defined('AJXP_EXEC') or die('Access not allowed');
+/**
+ * Class PydioUserAlertException
+ * @package Pydio\Core\Exception
+ */
class PydioUserAlertException extends PydioException{
}
@@ -22,9 +22,16 @@
defined('AJXP_EXEC') or die('Access not allowed');
-
+/**
+ * Class WorkspaceForbiddenException
+ * @package Pydio\Core\Exception
+ */
class WorkspaceForbiddenException extends PydioException
{
+ /**
+ * WorkspaceForbiddenException constructor.
+ * @param string $wsId
+ */
public function __construct($wsId)
{
parent::__construct("Cannot access to workspace with id/alias ".$wsId, null);
@@ -22,9 +22,16 @@
defined('AJXP_EXEC') or die('Access not allowed');
-
+/**
+ * Class WorkspaceNotFoundException
+ * @package Pydio\Core\Exception
+ */
class WorkspaceNotFoundException extends PydioException
{
+ /**
+ * WorkspaceNotFoundException constructor.
+ * @param string $wsId
+ */
public function __construct($wsId)
{
parent::__construct("Could not find workspace with id/alias ".$wsId, null);
@@ -32,12 +32,10 @@
use Pydio\Core\PluginFramework\PluginsService;
use Pydio\Core\Services\AuthService;
use Pydio\Core\Services\ConfService;
-use Pydio\Core\Services\RepositoryService;
use Pydio\Core\Services\RolesService;
use Pydio\Core\Services\UsersService;
use Pydio\Core\Utils\ApplicationState;
use Pydio\Core\Utils\TextEncoder;
-use Pydio\Core\Utils\Utils;
use Pydio\Log\Core\Logger;
use Pydio\Tasks\Task;
use Pydio\Tasks\TaskService;
@@ -98,6 +98,11 @@ public function handleRequest(ServerRequestInterface $requestInterface, Response
}
+ /**
+ * @param ServerRequestInterface $requestInterface
+ * @param ResponseInterface $responseInterface
+ * @return void
+ */
public function emitResponse(ServerRequestInterface $requestInterface, ResponseInterface $responseInterface){
if($responseInterface !== false && $responseInterface->getBody() && $responseInterface->getBody() instanceof SerializableResponseStream){
Oops, something went wrong.

0 comments on commit f8bc629

Please sign in to comment.