PhpSpec\Wrapper\Subject\SubjectWithArrayAccess::offsetExists PHP 메소드

offsetExists() 공개 메소드

public offsetExists ( string | integer $key ) : boolean
$key string | integer
리턴 boolean
    public function offsetExists($key)
    {
        $unwrapper = new Unwrapper();
        $subject = $this->caller->getWrappedObject();
        $key = $unwrapper->unwrapOne($key);
        $this->checkIfSubjectImplementsArrayAccess($subject);
        return isset($subject[$key]);
    }

Usage Example

예제 #1
0
파일: Subject.php 프로젝트: phpspec/phpspec
 /**
  * @param string|integer $key
  *
  * @return Subject
  */
 public function offsetExists($key)
 {
     return $this->wrap($this->arrayAccess->offsetExists($key));
 }