123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace Predis\Option;
- abstract class AbstractOption implements OptionInterface
- {
-
- public function filter(ClientOptionsInterface $options, $value)
- {
- return $value;
- }
-
- public function getDefault(ClientOptionsInterface $options)
- {
- return null;
- }
-
- public function __invoke(ClientOptionsInterface $options, $value)
- {
- if (isset($value)) {
- return $this->filter($options, $value);
- }
- return $this->getDefault($options);
- }
- }
|