library/Garp/Content/Db/Server/Abstract.php
protected function _lowerCaseTableAndViewNames(&$dump) {
        $configDir      = APPLICATION_PATH."/modules/default/Model/config/";
        $extension      = 'json';
        $patterns       = array();
        $replacements   = array();

        $hardcodedTables = array('AuthFacebook', 'AuthLocal', 'Video');
        foreach ($hardcodedTables as $hardcodedTable) {
            $patterns[]         = "`{$hardcodedTable}`";
            $replacements[]     = "`" . strtolower($hardcodedTable) ."`";
        }

        $modelConfig = new Garp_Model_Spawn_Config_Model_Set(
            new Garp_Model_Spawn_Config_Storage_File($configDir, $extension),
            new Garp_Model_Spawn_Config_Format_Json
        );
        $modelSet = new Garp_Model_Spawn_ModelSet($modelConfig);


        foreach ($modelSet as $model) {
            $lcModel            = strtolower($model->id);
            $patterns[]         = "`{$model->id}`";
            $replacements[]     = "`{$lcModel}`";

            $relations = $model->relations->getRelations();

            foreach ($relations as $relation) {
                if ($relation->type === 'hasAndBelongsToMany') {
                    $bindingModel   = $relation->getBindingModel();
                    $bindingName    = '_' . $bindingModel->id;
                    $lcRelation     = strtolower($bindingName);
                    $patterns[]     = "`{$bindingName}`";
                    $replacements[] = "`{$lcRelation}`";
                } else {
                    $lcRelation     = strtolower($relation->name);
                    $patterns[]     = "`{$relation->name}`";
                    $replacements[] = "`{$lcRelation}`";
                }
            }
        }

        $dump = str_replace($patterns, $replacements, $dump);
        return $dump;
    }
protected function _lowerCaseTableAndViewNames(&$dump) {
        $configDir      = APPLICATION_PATH."/modules/default/Model/config/";
        $extension      = 'json';
        $patterns       = array();
        $replacements   = array();

        $hardcodedTables = array('AuthFacebook', 'AuthLocal', 'Video');
        foreach ($hardcodedTables as $hardcodedTable) {
            $patterns[]         = "`{$hardcodedTable}`";
            $replacements[]     = "`" . strtolower($hardcodedTable) ."`";
        }

        $modelConfig = new Garp_Model_Spawn_Config_Model_Set(
            new Garp_Model_Spawn_Config_Storage_File($configDir, $extension),
            new Garp_Model_Spawn_Config_Format_Json
        );
        $modelSet = new Garp_Model_Spawn_ModelSet($modelConfig);


        foreach ($modelSet as $model) {
            $lcModel            = strtolower($model->id);
            $patterns[]         = "`{$model->id}`";
            $replacements[]     = "`{$lcModel}`";

            $relations = $model->relations->getRelations();

            foreach ($relations as $relation) {
                if ($relation->type === 'hasAndBelongsToMany') {
                    $bindingModel   = $relation->getBindingModel();
                    $bindingName    = '_' . $bindingModel->id;
                    $lcRelation     = strtolower($bindingName);
                    $patterns[]     = "`{$bindingName}`";
                    $replacements[] = "`{$lcRelation}`";
                } else {
                    $lcRelation     = strtolower($relation->name);
                    $patterns[]     = "`{$relation->name}`";
                    $replacements[] = "`{$lcRelation}`";
                }
            }
        }

        $dump = str_replace($patterns, $replacements, $dump);
        return $dump;
    }
protected function _lowerCaseTableAndViewNames ( & $ dump ) { $ configDir = APPLICATION_PATH . "/modules/default/Model/config/" ; $ extension = 'json' ; $ patterns = array ( ) ; $ replacements = array ( ) ; $ hardcodedTables = array ( 'AuthFacebook' , 'AuthLocal' , 'Video' ) ; foreach ( $ hardcodedTables as $ hardcodedTable ) { $ patterns [ ] = "`{$hardcodedTable}`" ; $ replacements [ ] = "`" . strtolower ( $ hardcodedTable ) . "`" ; } $ modelConfig = new Garp_Model_Spawn_Config_Model_Set ( new Garp_Model_Spawn_Config_Storage_File ( $ configDir , $ extension ) , new Garp_Model_Spawn_Config_Format_Json ) ; $ modelSet = new Garp_Model_Spawn_ModelSet ( $ modelConfig ) ; foreach ( $ modelSet as $ model ) { $ lcModel = strtolower ( $ model -> id ) ; $ patterns [ ] = "`{$model->id}`" ; $ replacements [ ] = "`{$lcModel}`" ; $ relations = $ model -> relations -> getRelations ( ) ; foreach ( $ relations as $ relation ) { if ( $ relation -> type === 'hasAndBelongsToMany' ) { $ bindingModel = $ relation -> getBindingModel ( ) ; $ bindingName = '_' . $ bindingModel -> id ; $ lcRelation = strtolower ( $ bindingName ) ; $ patterns [ ] = "`{$bindingName}`" ; $ replacements [ ] = "`{$lcRelation}`" ; } else { $ lcRelation = strtolower ( $ relation -> name ) ; $ patterns [ ] = "`{$relation->name}`" ; $ replacements [ ] = "`{$lcRelation}`" ; } } } $ dump = str_replace ( $ patterns , $ replacements , $ dump ) ; return $ dump ; }
Lowercase the table and view names, for compatibility's sake.
Can we deprecate this method already?
@param   String  &$dump  Output of MySQL dump.
@return  String          The dump output, with adjusted casing.
Lowercase the table and view names for compatibility s sake . Can we deprecate this method already?