Bake\Shell\Task\ModelTask::_getAllTables PHP Method

_getAllTables() protected method

Get an Array of all the tables in the supplied connection will halt the script if no tables are found.
protected _getAllTables ( ) : array
return array Array of tables in the database.
    protected function _getAllTables()
    {
        $db = ConnectionManager::get($this->connection);
        if (!method_exists($db, 'schemaCollection')) {
            $this->err('Connections need to implement schemaCollection() to be used with bake.');
            return $this->_stop();
        }
        $schema = $db->schemaCollection();
        $tables = $schema->listTables();
        if (empty($tables)) {
            $this->err('Your database does not have any tables.');
            return $this->_stop();
        }
        sort($tables);
        return $tables;
    }