Dictionary.php
public static function fromArray($array)
    {
        if (!is_array($array) && !($array instanceof \Traversable)) {
            throw new \InvalidArgumentException(sprintf(
                'Dictionary::fromArray() argument must be array or Traversable, '
                . 'but is "%s".', gettype($array)
            ));
        }

        $result = new Dictionary();
        foreach ($array as $key => $value) {
            $result[$key] = $value;
        }
        return $result;
    }
public static function fromArray($array)
    {
        if (!is_array($array) && !($array instanceof \Traversable)) {
            throw new \InvalidArgumentException(sprintf(
                'Dictionary::fromArray() argument must be array or Traversable, '
                . 'but is "%s".', gettype($array)
            ));
        }

        $result = new Dictionary();
        foreach ($array as $key => $value) {
            $result[$key] = $value;
        }
        return $result;
    }
public static function fromArray ( $ array ) { if ( ! is_array ( $ array ) && ! ( $ array instanceof \ Traversable ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Dictionary::fromArray() argument must be array or Traversable, ' . 'but is "%s".' , gettype ( $ array ) ) ) ; } $ result = new Dictionary ( ) ; foreach ( $ array as $ key => $ value ) { $ result [ $ key ] = $ value ; } return $ result ; }
Create new Dictionary from standard PHP array.

@param  $array        array   Array to create Dictionary from.
@return Dictionary
Create new Dictionary from standard PHP array .