DboSource::dropTable PHP Méthode

dropTable() public méthode

テーブルを削除する
public dropTable ( array $options ) : boolean
$options array [ schema / table ]
Résultat boolean
    public function dropTable($options)
    {
        extract($options);
        if (!isset($schema) && !isset($table)) {
            return false;
        }
        if (!isset($schema)) {
            $schema = $this->readSchema($table);
            if (isset($schema['tables'][$table])) {
                $schema = $schema['tables'][$table];
            } else {
                return false;
            }
        }
        if (is_array($schema)) {
            $name = Inflector::pluralize(Inflector::classify($table));
            $options = array('name' => $name, 'connection' => $this->configKeyName, $table => $schema);
            $schema = new CakeSchema($options);
        }
        $sql = $this->dropSchema($schema);
        $return = $this->execute($sql);
        // とりあえずキャッシュを全て削除
        clearCache(null, 'models');
        return $return;
    }
DboSource