__get() public method

public __get ( $property )
Esempio 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;
             }
     }
 }
Esempio n. 2
0
 public function __get($property)
 {
     switch ($property) {
         case 'toString':
             return $this->toString();
         default:
             return parent::__get($property);
     }
 }
Esempio n. 3
0
 public function __get($property)
 {
     switch (strtolower($property)) {
         case 'iszero':
             return $this->isZero();
         default:
             return parent::__get($property);
     }
 }
Esempio n. 4
0
 public function __get($property)
 {
     switch (strtolower($property)) {
         case 'isfalse':
         case 'istrue':
             return $this->{$property}();
         default:
             return parent::__get($property);
     }
 }
Esempio n. 5
0
 public function __get($property)
 {
     switch (true) {
         case strtolower($property) == 'isfalse':
             return $this->isFalse();
         case strtolower($property) == 'istrue':
             return $this->isTrue();
         default:
             return parent::__get($property);
     }
 }
Esempio n. 6
0
 public function __get($property)
 {
     switch (strtolower($property)) {
         case 'tostring':
         case 'isempty':
         case 'istestedinstance':
         case 'isnottestedinstance':
         case 'isinstanceoftestedclass':
             return $this->{$property}();
         default:
             return parent::__get($property);
     }
 }
Esempio n. 7
0
 public function __get($asserter)
 {
     switch ($asserter) {
         case 'keys':
             return $this->getKeysAsserter();
         case 'size':
             return $this->getSizeAsserter();
         default:
             $asserter = parent::__get($asserter);
             if ($asserter instanceof asserters\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;
             }
     }
 }