public function getFields($visibility = Field::VISIBILITY_PUBLIC)
    {
        $ret = [];
        foreach ($this->fields as $name => $field) {
            if ($field->getVisibility() & $visibility) {
                $ret[$name] = $field;
            }
        }
        return $ret;
    }
public function getFields($visibility = Field::VISIBILITY_PUBLIC)
    {
        $ret = [];
        foreach ($this->fields as $name => $field) {
            if ($field->getVisibility() & $visibility) {
                $ret[$name] = $field;
            }
        }
        return $ret;
    }
public function getFields ( $ visibility = Field :: VISIBILITY_PUBLIC ) { $ ret = [ ] ; foreach ( $ this -> fields as $ name => $ field ) { if ( $ field -> getVisibility ( ) & $ visibility ) { $ ret [ $ name ] = $ field ; } } return $ ret ; }
Get an associative array of the fields in this collection

@param integer $visibility A bitmask to filter fields by visibility
@return array<string,sndsgd\Field>
Get an associative array of the fields in this collection