has() public méthode

Checks if the given key is present
public has ( string $name ) : boolean
$name string The key to check
Résultat boolean
Exemple #1
0
 public function testUnset()
 {
     // like object
     $data = new Data($this->_test);
     is('qwerty', $data->get('string'));
     unset($data->string);
     isFalse($data->has('string'));
     // like array
     $data = new Data($this->_test);
     is('qwerty', $data['string']);
     unset($data['string']);
     isFalse($data->has('string'));
 }