protected function getFields()
    {
        $fields = [];

        foreach ($this as $k => $v) {
            if (is_string($k) && strpos($k, '_') !== 0) {
                $fields[] = $k;
            }
        }

        foreach ($this->_fields as $k => $v) {
            if (is_string($k)) {
                $fields[] = $k;
            }
        }

        return $fields;
    }
protected function getFields()
    {
        $fields = [];

        foreach ($this as $k => $v) {
            if (is_string($k) && strpos($k, '_') !== 0) {
                $fields[] = $k;
            }
        }

        foreach ($this->_fields as $k => $v) {
            if (is_string($k)) {
                $fields[] = $k;
            }
        }

        return $fields;
    }
protected function getFields ( ) { $ fields = [ ] ; foreach ( $ this as $ k => $ v ) { if ( is_string ( $ k ) && strpos ( $ k , '_' ) !== 0 ) { $ fields [ ] = $ k ; } } foreach ( $ this -> _fields as $ k => $ v ) { if ( is_string ( $ k ) ) { $ fields [ ] = $ k ; } } return $ fields ; }
An internal method that builds a list of available fields depending on context.

@return array
An internal method that builds a list of available fields depending on context .