concat() 공개 정적인 메소드

Unlike flatten, concat does not merge arrays that are nested more that once. Example: $result = Arrays::concat(array(array(1, 2), array(3, 4))); Result: Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 )
public static concat ( array $arrays ) : array
$arrays array
리턴 array
예제 #1
0
파일: OrClause.php 프로젝트: letsdrink/ouzo
 public function getParameters()
 {
     return Arrays::concat(Arrays::map($this->conditions, function (WhereClause $where) {
         return $where->getParameters();
     }));
 }
예제 #2
0
 /**
  * @test
  */
 public function shouldConcatEmptyArray()
 {
     //given
     $array = array();
     //when
     $flattened = Arrays::concat($array);
     //then
     $this->assertEquals(array(), $flattened);
 }