Predis\Configuration\Options::defined PHP Метод

defined() публичный Метод

public defined ( $option )
    public function defined($option)
    {
        return array_key_exists($option, $this->options) || array_key_exists($option, $this->input);
    }

Usage Example

Пример #1
0
 /**
  * @group disconnected
  */
 public function testCanCheckOptionsIfDefinedByUser()
 {
     $options = new Options(array('prefix' => 'prefix:', 'custom' => 'foobar', 'void' => null));
     $this->assertTrue($options->defined('prefix'));
     $this->assertTrue($options->defined('custom'));
     $this->assertTrue($options->defined('void'));
     $this->assertFalse($options->defined('profile'));
 }