-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #916 from oat-sa/release-15.3.0
Release 15.3.0
- Loading branch information
Showing
33 changed files
with
1,931 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,7 @@ | |
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Copyright (c) 2014 (original work) Open Assessment Technologies SA; | ||
* | ||
* Copyright (c) 2014-2021 (original work) Open Assessment Technologies SA; | ||
*/ | ||
|
||
namespace oat\oatbox; | ||
|
@@ -31,24 +30,29 @@ | |
* https://github.com/basdenooijer/solarium/blob/master/library/Solarium/Core/Configurable.php | ||
* | ||
* @author Joel Bout <[email protected]> | ||
* @deprecated New services must be registered using Dependency Injection Container | ||
*/ | ||
abstract class Configurable implements PhpSerializable, TaoLoggerAwareInterface | ||
{ | ||
use LoggerAwareTrait; | ||
|
||
|
||
/** @var array */ | ||
private $options = []; | ||
|
||
/** | ||
* public constructor to allow the object to be recreated from php code | ||
* | ||
* @param array $options | ||
* @deprecated New services must be registered using Dependency Injection Container | ||
*/ | ||
public function __construct($options = []) | ||
{ | ||
$this->setOptions($options); | ||
} | ||
|
||
/** | ||
* @deprecated Use \oat\generis\model\DependencyInjection\ServiceOptions instead | ||
*/ | ||
public function setOption($name, $value) | ||
{ | ||
$this->options[$name] = $value; | ||
|
@@ -60,6 +64,7 @@ public function setOption($name, $value) | |
* @param array $options | ||
* @return void | ||
* @throws \common_exception_Error | ||
* @deprecated Use \oat\generis\model\DependencyInjection\ServiceOptions instead | ||
*/ | ||
public function setOptions(array $options) | ||
{ | ||
|
@@ -72,12 +77,13 @@ public function setOptions(array $options) | |
} | ||
$this->options = $options; | ||
} | ||
|
||
/** | ||
* Returns whenever or not the option is defined | ||
* | ||
* @param string $name | ||
* @return boolean | ||
* @deprecated Use \oat\generis\model\DependencyInjection\ServiceOptions instead | ||
*/ | ||
public function hasOption($name) | ||
{ | ||
|
@@ -92,25 +98,28 @@ public function hasOption($name) | |
* @param string $name | ||
* @param mixed|null $default Default value to return if option is not set. | ||
* @return mixed | ||
* @deprecated Use \oat\generis\model\DependencyInjection\ServiceOptions instead | ||
*/ | ||
public function getOption($name, $default = null) | ||
{ | ||
return $this->options[$name] ?? $default; | ||
} | ||
|
||
/** | ||
* Get all options | ||
* | ||
* @return array | ||
|
||
/** | ||
* Get all options | ||
* | ||
* @return array | ||
* @deprecated Use \oat\generis\model\DependencyInjection\ServiceOptions instead | ||
*/ | ||
public function getOptions() | ||
{ | ||
return $this->options; | ||
} | ||
|
||
/** | ||
* (non-PHPdoc) | ||
* @see \oat\oatbox\PhpSerializable::__toPhpCode() | ||
* @deprecated Use \oat\generis\model\DependencyInjection\ServiceOptions instead | ||
*/ | ||
public function __toPhpCode() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,43 +15,42 @@ | |
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Copyright (c) 2015 (original work) Open Assessment Technologies SA; | ||
* | ||
* Copyright (c) 2015-2021 (original work) Open Assessment Technologies SA; | ||
*/ | ||
|
||
namespace oat\oatbox\service; | ||
|
||
|
||
use oat\oatbox\Configurable; | ||
use oat\oatbox\log\LoggerAwareTrait; | ||
use oat\oatbox\service\exception\InvalidService; | ||
use oat\oatbox\service\exception\InvalidServiceManagerException; | ||
use Psr\Log\LoggerAwareInterface; | ||
use Zend\ServiceManager\ServiceLocatorAwareInterface; | ||
|
||
|
||
/** | ||
* Configurable base service | ||
* | ||
* inspired by Solarium\Core\Configurable by Bas de Nooijer | ||
* https://github.com/basdenooijer/solarium/blob/master/library/Solarium/Core/Configurable.php | ||
* | ||
* @author Joel Bout <[email protected]> | ||
* @deprecated New services must be registered using Dependency Injection Container | ||
*/ | ||
abstract class ConfigurableService extends Configurable implements ServiceLocatorAwareInterface | ||
{ | ||
use ServiceManagerAwareTrait; | ||
|
||
/** @var string Documentation header */ | ||
|
||
|
||
protected $header = null; | ||
|
||
/** @var object[] */ | ||
private $subServices = []; | ||
|
||
/** | ||
* Get the service manager | ||
* | ||
* @deprecated Use $this->propagate instead | ||
* | ||
* @param $serviceManager | ||
*/ | ||
* Get the service manager | ||
* | ||
* @deprecated Use $this->propagate instead | ||
* | ||
* @param $serviceManager | ||
*/ | ||
public function setServiceManager($serviceManager) | ||
{ | ||
$this->setServiceLocator($serviceManager); | ||
|
@@ -65,6 +64,7 @@ public function setServiceManager($serviceManager) | |
* @return mixed | ||
* @throws InvalidService | ||
* @throws InvalidServiceManagerException | ||
* @deprecated New services must be registered using Dependency Injection Container | ||
*/ | ||
public function getSubService($id, $interface = null) | ||
{ | ||
|
@@ -87,6 +87,7 @@ public function getSubService($id, $interface = null) | |
* Set the documentation header uses into config file | ||
* | ||
* @param $header | ||
* @deprecated New services must be registered using Dependency Injection Container | ||
*/ | ||
public function setHeader($header) | ||
{ | ||
|
@@ -97,6 +98,7 @@ public function setHeader($header) | |
* Return the documentation header | ||
* | ||
* @return string | ||
* @deprecated New services must be registered using Dependency Injection Container | ||
*/ | ||
public function getHeader() | ||
{ | ||
|
@@ -111,6 +113,7 @@ public function getHeader() | |
* Get the documentation header | ||
* | ||
* @return string | ||
* @deprecated New services must be registered using Dependency Injection Container | ||
*/ | ||
protected function getDefaultHeader() | ||
{ | ||
|
@@ -128,6 +131,7 @@ protected function getDefaultHeader() | |
* @return mixed | ||
* @throws InvalidService | ||
* @throws InvalidServiceManagerException | ||
* @deprecated New services must be registered using Dependency Injection Container | ||
*/ | ||
protected function buildService($serviceDefinition, $interfaceName = null) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.