public function getDbTableName(): string
    {
        // Name set in class
        if ($this->db_table) {
            return $this->db_table;
        }

        $db_table_from_class = mb_strtolower(Converter::fromCamelCase(str_replace([self::CLASS_RELATION_NAME_ENTITY, self::CLASS_RELATION_NAME_REPOSITORY], '', $this->getUnqualifiedShortClassName()))) . 's';

        // Check DB in system tables
        $this->db_table = 'cms_' . $db_table_from_class;
        if (!SQL::getInstance()->tableExists($this->db_table)) {
            // Or in module tables
            $this->db_table = 'm_' . $db_table_from_class;
        }

        return $this->db_table;
    }
public function getDbTableName(): string
    {
        // Name set in class
        if ($this->db_table) {
            return $this->db_table;
        }

        $db_table_from_class = mb_strtolower(Converter::fromCamelCase(str_replace([self::CLASS_RELATION_NAME_ENTITY, self::CLASS_RELATION_NAME_REPOSITORY], '', $this->getUnqualifiedShortClassName()))) . 's';

        // Check DB in system tables
        $this->db_table = 'cms_' . $db_table_from_class;
        if (!SQL::getInstance()->tableExists($this->db_table)) {
            // Or in module tables
            $this->db_table = 'm_' . $db_table_from_class;
        }

        return $this->db_table;
    }
public function getDbTableName ( ) : string { // Name set in class if ( $ this -> db_table ) { return $ this -> db_table ; } $ db_table_from_class = mb_strtolower ( Converter :: fromCamelCase ( str_replace ( [ self :: CLASS_RELATION_NAME_ENTITY , self :: CLASS_RELATION_NAME_REPOSITORY ] , '' , $ this -> getUnqualifiedShortClassName ( ) ) ) ) . 's' ; // Check DB in system tables $ this -> db_table = 'cms_' . $ db_table_from_class ; if ( ! SQL :: getInstance ( ) -> tableExists ( $ this -> db_table ) ) { // Or in module tables $ this -> db_table = 'm_' . $ db_table_from_class ; } return $ this -> db_table ; }
Return name in class or try to get from class name

@return string
Return name in class or try to get from class name