DboSource::dropTableBySchema PHP Method

dropTableBySchema() public method

スキーマファイルからテーブルを削除する
public dropTableBySchema ( $options ) : boolean
return boolean
    public function dropTableBySchema($options)
    {
        extract($options);
        if (!isset($path)) {
            return false;
        }
        $dir = dirname($path);
        $file = basename($path);
        if (!isset($name)) {
            $name = basename(Inflector::classify($file), '.php');
        }
        $CakeSchema = ClassRegistry::init('CakeSchema');
        $CakeSchema->connection = $this->configKeyName;
        $schema = $CakeSchema->load(array('name' => $name, 'path' => $dir, 'file' => $file));
        return $this->dropTable(array('schema' => $schema));
    }
DboSource