public function getFiles($name = null)
    {
        if ($name !== null) {
            if (!array_key_exists($name, $this->files)) {
                throw new RuntimeException(sprintf(
                    'Attempted to access non-existing field %s', $name
                ));
            }

            return $this->hydrateAll($this->files[$name]);
        } else {
            return $this->hydrateAll($this->files);
        }
    }
public function getFiles($name = null)
    {
        if ($name !== null) {
            if (!array_key_exists($name, $this->files)) {
                throw new RuntimeException(sprintf(
                    'Attempted to access non-existing field %s', $name
                ));
            }

            return $this->hydrateAll($this->files[$name]);
        } else {
            return $this->hydrateAll($this->files);
        }
    }
public function getFiles ( $ name = null ) { if ( $ name !== null ) { if ( ! array_key_exists ( $ name , $ this -> files ) ) { throw new RuntimeException ( sprintf ( 'Attempted to access non-existing field %s' , $ name ) ) ; } return $ this -> hydrateAll ( $ this -> files [ $ name ] ) ; } else { return $ this -> hydrateAll ( $ this -> files ) ; } }
Return all files. Optionally filtered by named input

@param string $name Name filter
@throws \RuntimeException if $name isn't valid field
@return object
Return all files . Optionally filtered by named input