createTable

@param string   $name
@param callable $callback
@param bool     $ifNotExists
@param array    $options

@return AbstractTable
343035
public function createTable($name, callable $callback, $ifNotExists = true, $options = [])
    {
        $options = $this->prepareBCOptions($options);

        return $this->getTable($name)->create($callback, $ifNotExists, $options);
    }
247022
public function purgeQueue($name, array $options = [], callable $callback = null)
    {
        $noWait = array_key_exists('noWait', $options) ? (bool)$options['noWait'] : null;

        $outputFrame = Queue\QueuePurgeFrame::create($name, $noWait);
        $outputFrame->frameChannelId = $this->id;
        $this->connection->command($outputFrame);

        if (is_callable($callback)) {
            $this->on(self::EVENT_ON_CHANNEL_PURGE_QUEUE_CALLBACK, $callback);
        }
    }
607040
public function createTable($name)
    {
        $cloudTable = null;

        try {
            $this->_tableProxy->createTable($name);
            $cloudTable = new CloudTable($name, $this->_tableProxy);
        } catch (\Exception $e) {
            if ($e->getCode() == WindowsAzureErrorCodes::TABLE_ALREADY_EXISTS) {
                $cloudTable = new CloudTable($name, $this->_tableProxy);
            }
        }

        return $cloudTable;
    }
1195541
function createIndex($name, $callback = false)
    {

        $index = new Index($name, $callback);

        $index->connection = $this->connection;

        return $index->create();
    }
161961
public static function createTable($table, callable $callback) {
        $table = new Table($table);
        call_user_func($callback, $table);
        return $table->create();
    }
30007
public function create($name, $type = null, array $options = [])
    {
        return $this->formBuilder->create($name, $type, $options);
    }
1240232
protected function addTwigFunction($name, $callback, $options = [])
    {
        // If we pass a callback as a simple string, we need to turn it into an array.
        if (is_string($callback) && method_exists($this, $callback)) {
            $callback = [$this, $callback];
        }

        $safe = method_exists($this, 'isSafe') && $this->isSafe();
        if (isset($options['safe'])) {
            $safe = (bool) $options['safe'];
            unset($options['safe']);
        }

        $this->twigFunctions[] = new TwigFunction($name, $callback, $options);

        if ($safe) {
            $this->safeFunctionNames[] = $name;
        }
    }
1094999
function(name, schema, callback){
    var self = this;
    this.db.serialize(function() {
      self.db.run("CREATE TABLE IF NOT EXISTS\"" + name + "\" " + schema, callback);
    });
  }
415629
public function add(string $name, callable $callback): \IvoPetkov\BearFrameworkAddons\ServerRequests
    {
        $this->callbacks[$name] = $callback;
        return $this;
    }
120768
protected function addTwigFilter($name, $callback, $options = [])
    {
        // If we pass a callback as a simple string, we need to turn it into an array.
        if (is_string($callback) && method_exists($this, $callback)) {
            $callback = [$this, $callback];
        }

        $safe = method_exists($this, 'isSafe') && $this->isSafe();
        if (isset($options['safe'])) {
            $safe = (bool) $options['safe'];
            unset($options['safe']);
        }

        $this->twigFilters[] = new TwigFilter($name, $callback, $options);

        if ($safe) {
            $this->safeFilterNames[] = $name;
        }
    }
210440
public function createTable($table, $options)
    {
        $table = $this->buildRealTableName($table);
        $sql = $this->getSchema()->getCreateTableSql($table, $options);
        $ret = $this->query($sql);
        return $ret;
    }
768905
public function if($name, callable $callback)
    {
        $this->conditions[$name] = $callback;

        $this->directive($name, function ($expression) use ($name) {
            return $expression !== ''
                    ? "<?php if (\Illuminate\Support\Facades\Blade::check('{$name}', {$expression})): ?>"
                    : "<?php if (\Illuminate\Support\Facades\Blade::check('{$name}')): ?>";
        });

        $this->directive('else'.$name, function ($expression) use ($name) {
            return $expression !== ''
                ? "<?php elseif (\Illuminate\Support\Facades\Blade::check('{$name}', {$expression})): ?>"
                : "<?php elseif (\Illuminate\Support\Facades\Blade::check('{$name}')): ?>";
        });

        $this->directive('end'.$name, function () {
            return '<?php endif; ?>';
        });
    }
486888
protected function createCheckbox($name, $options)
    {
        $box = new Checkbox($name, $options);
        $box->setAttribute('checked', true)
            ->setAttribute(
                'id',
                preg_replace(
                    array('~\[~', '~\]~', '~--+~', '~-$~'),
                    array('-', '', '-', ''),
                    $name
                )
            );

        return $box;
    }
864597
public function save($schema, $ifNotExists = true, $options = [])
    {
        $schema = $this->callSchema($schema);

        if ($this->exists()) {
            $this->update($schema);
        } else {
            $this->create($schema, $ifNotExists, $options);
        }

        $database = $this->db->getDatabase();
        $database->reset();

        return $this->reset();
    }
992002
protected function CreateTable($name, array $fieldNames, $alias = '')
    {
        return new Table($this->connection, $name, $fieldNames, $alias);
    }
494860
public function deleteQueue($name, array $options = [], callable $callback = null)
    {
        $ifUnused = array_key_exists('ifUnused', $options) ? (bool)$options['ifUnused'] : null;
        $ifEmpty = array_key_exists('ifEmpty', $options) ? (bool)$options['ifEmpty'] : null;
        $noWait = array_key_exists('noWait', $options) ? (bool)$options['noWait'] : null;

        $outputFrame = Queue\QueueDeleteFrame::create($name, $ifUnused, $ifEmpty, $noWait);
        $outputFrame->frameChannelId = $this->id;
        $this->connection->command($outputFrame);

        if (is_callable($callback)) {
            $this->on(self::EVENT_ON_CHANNEL_DELETE_QUEUE_CALLBACK, $callback);
        }
    }
1099285
public function createCollection($name, array $options = [])
    {
        return $this->bridge->createCollection($this->cName($name), $options);
    }