public function getFormat($type)
    {
        if (!$this->typeIsAvailable($type)) {
            return false;
        }

        if (isset($this->formats[$type])) {
            return $this->formats[$type];
        }

        if (!is_null($this->getDefaultFormat())) {
            return $this->getDefaultFormat();
        }

        return false;
    }
public function getFormat($type)
    {
        if (!$this->typeIsAvailable($type)) {
            return false;
        }

        if (isset($this->formats[$type])) {
            return $this->formats[$type];
        }

        if (!is_null($this->getDefaultFormat())) {
            return $this->getDefaultFormat();
        }

        return false;
    }
public function getFormat ( $ type ) { if ( ! $ this -> typeIsAvailable ( $ type ) ) { return false ; } if ( isset ( $ this -> formats [ $ type ] ) ) { return $ this -> formats [ $ type ] ; } if ( ! is_null ( $ this -> getDefaultFormat ( ) ) ) { return $ this -> getDefaultFormat ( ) ; } return false ; }
Return format for a given type.

@param $type
@return bool|string
Return format for a given type .