Flow\Helper::join PHP Method

join() public static method

public static join ( $obj = null, $glue = '' )
    public static function join($obj = null, $glue = '')
    {
        $obj = $obj instanceof \Traversable ? iterator_to_array($obj) : (array) $obj;
        return join($glue, $obj);
    }

Usage Example

Beispiel #1
0
 public function test_join()
 {
     $this->assertEquals('foobar', Helper::join(array('foo', 'bar')));
     $this->assertEquals('foobar', Helper::join(new \ArrayIterator(array('foo', 'bar'))));
 }