示例#1
0
 /**
  * Replace marker
  *
  * @return void
  */
 private function replace()
 {
     foreach ($this->replacementArray as $_key => $_value) {
         if (String::isValid($_value)) {
             $this->replaceString($_key, $_value);
         } elseif (Collection::isValid($_value)) {
             $this->replaceArray($_key, $_value);
         } elseif (Object::isValid($_value)) {
             $this->replaceObject($_key, $_value);
         }
     }
     $this->cleanup();
 }
示例#2
0
 /**
  *
  */
 public function testIsValid()
 {
     $this->assertInternalType('bool', Object::isValid(['a', 'b', 'c']));
     $this->assertInternalType('bool', Object::isValid(''));
     $this->assertInternalType('bool', Object::isValid(NULL));
     /** @noinspection PhpParamsInspection */
     $this->assertInternalType('bool', Object::isValid(new stdClass()));
     $this->assertFalse(Object::isValid(['a', 'b', 'c']));
     $this->assertFalse(Object::isValid('abc'));
     $this->assertFalse(Object::isValid(NULL));
     /** @noinspection PhpParamsInspection */
     $this->assertTrue(Object::isValid(new stdClass()));
 }