mageekguy\atoum\asserters\variable::__get PHP Method

__get() public method

public __get ( $property )
    public function __get($property)
    {
        switch (strtolower($property)) {
            case 'isnull':
            case 'isnotnull':
            case 'isnotfalse':
            case 'isnottrue':
            case 'iscallable':
            case 'isnotcallable':
                return $this->{$property}();
            default:
                return parent::__get($property);
        }
    }

Usage Example

Ejemplo n.º 1
0
 public function __get($asserter)
 {
     switch (strtolower($asserter)) {
         case 'keys':
             return $this->getKeysAsserter();
         case 'size':
             return $this->getSizeAsserter();
         case 'isempty':
             return $this->isEmpty();
         case 'isnotempty':
             return $this->isNotEmpty();
         case 'child':
             $asserter = new phpArray\child($this);
             $this->resetInnerAsserter();
             return $asserter->setWith($this->value);
         default:
             $asserter = parent::__get($asserter);
             if ($asserter instanceof variable === false) {
                 $this->resetInnerAsserter();
                 return $asserter;
             } else {
                 if ($this->innerAsserter === null || $this->innerAsserterUsed === true) {
                     $this->innerValue = $this->value;
                     $this->innerAsserterUsed = false;
                 }
                 $this->innerAsserter = $asserter;
                 return $this;
             }
     }
 }
All Usage Examples Of mageekguy\atoum\asserters\variable::__get