isInstanceOf() публичный статический Метод

public static isInstanceOf ( $type )
Пример #1
0
 private static function _buildWhereKeyIn($column, array $array)
 {
     $useRestrictions = Arrays::any($array, Functions::isInstanceOf('\\Ouzo\\Restriction\\Restriction'));
     if ($useRestrictions) {
         return DialectUtil::joinClauses($array, 'OR', function (Restriction $restriction) use($column) {
             return $restriction->toSql($column);
         });
     }
     $in = implode(', ', array_fill(0, count($array), '?'));
     return $column . ' IN (' . $in . ')';
 }
Пример #2
0
 /**
  * @test
  */
 public function shouldCheckIfParameterIsInstanceOfGivenType()
 {
     $this->assertTrue(Functions::call(Functions::isInstanceOf('stdClass'), new \stdClass()));
     $this->assertFalse(Functions::call(Functions::isInstanceOf('stdClass'), 'value'));
 }