mirror of
https://github.com/predis/predis.git
synced 2026-08-23 02:40:57 +00:00
21 lines
366 B
PHP
21 lines
366 B
PHP
<?php
|
|
|
|
namespace Predis\Options;
|
|
|
|
class Option implements IOption {
|
|
public function validate($value) {
|
|
return $value;
|
|
}
|
|
|
|
public function getDefault() {
|
|
return null;
|
|
}
|
|
|
|
public function __invoke($value) {
|
|
if (isset($value)) {
|
|
return $this->validate($value);
|
|
}
|
|
return $this->getDefault();
|
|
}
|
|
}
|