public function getTypes()
    {
        $oDb     = Factory::service('Database');
        $oResult = $oDb->query('SHOW COLUMNS FROM `' . $this->table . '` LIKE "type"')->row();
        $sTypes  = $oResult->Type;
        $sTypes  = preg_replace('/enum\((.*)\)/', '$1', $sTypes);
        $sTypes  = str_replace("'", '', $sTypes);
        $aTypes  = explode(',', $sTypes);

        $aOut = [];

        foreach ($aTypes as $sType) {
            $aOut[$sType] = ucwords(strtolower($sType));
        }

        return $aOut;
    }
public function getTypes()
    {
        $oDb     = Factory::service('Database');
        $oResult = $oDb->query('SHOW COLUMNS FROM `' . $this->table . '` LIKE "type"')->row();
        $sTypes  = $oResult->Type;
        $sTypes  = preg_replace('/enum\((.*)\)/', '$1', $sTypes);
        $sTypes  = str_replace("'", '', $sTypes);
        $aTypes  = explode(',', $sTypes);

        $aOut = [];

        foreach ($aTypes as $sType) {
            $aOut[$sType] = ucwords(strtolower($sType));
        }

        return $aOut;
    }
public function getTypes ( ) { $ oDb = Factory :: service ( 'Database' ) ; $ oResult = $ oDb -> query ( 'SHOW COLUMNS FROM `' . $ this -> table . '` LIKE "type"' ) -> row ( ) ; $ sTypes = $ oResult -> Type ; $ sTypes = preg_replace ( '/enum\((.*)\)/' , '$1' , $ sTypes ) ; $ sTypes = str_replace ( "'" , '' , $ sTypes ) ; $ aTypes = explode ( ',' , $ sTypes ) ; $ aOut = [ ] ; foreach ( $ aTypes as $ sType ) { $ aOut [ $ sType ] = ucwords ( strtolower ( $ sType ) ) ; } return $ aOut ; }
Parses the `type` column and returns an array of potential post types
@return array
Parses the type column and returns an array of potential post types