public static function factory (array $field) 
    {
        foreach (array('tag', 'occurrence', 'subfields') as $index) {
            if (!array_key_exists($index, $field)) {
                throw new InvalidArgumentException("Missing '{$index}' index in field array");
            }
        }
        return new Field($field['tag'],
                         $field['occurrence'],
                         array_map(array('HAB\Pica\Record\Subfield', 'factory'), $field['subfields']));
    }
public static function factory (array $field) 
    {
        foreach (array('tag', 'occurrence', 'subfields') as $index) {
            if (!array_key_exists($index, $field)) {
                throw new InvalidArgumentException("Missing '{$index}' index in field array");
            }
        }
        return new Field($field['tag'],
                         $field['occurrence'],
                         array_map(array('HAB\Pica\Record\Subfield', 'factory'), $field['subfields']));
    }
public static function factory ( array $ field ) { foreach ( array ( 'tag' , 'occurrence' , 'subfields' ) as $ index ) { if ( ! array_key_exists ( $ index , $ field ) ) { throw new InvalidArgumentException ( "Missing '{$index}' index in field array" ) ; } } return new Field ( $ field [ 'tag' ] , $ field [ 'occurrence' ] , array_map ( array ( 'HAB\Pica\Record\Subfield' , 'factory' ) , $ field [ 'subfields' ] ) ) ; }
Return a new field based on its array representation.

@throws InvalidArgumentException Missing `tag', `occurrene', or `subfields' index
@param  array $field Array representation of a field
@return \HAB\Pica\Record\Field A shiny new field
Return a new field based on its array representation .