示例#1
0
 function test_flatten()
 {
     $data = array(array('#foo', '#bar'), array('#baz'));
     $expected = array('#foo', '#bar', '#baz');
     $this->assertEquals($expected, Arr::flatten($data));
     $this->assertEquals($expected, wpdevsclub_array_flatten($data));
 }
示例#2
0
 /**
  * Get a flattened array of the items in the collection.
  *
  * @return static
  */
 public function flatten()
 {
     return new static(wpdevsclub_array_flatten($this->items));
 }