for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Class CreateDatabaseAbstract
*
* @filesource CreateDatabaseAbstract.php
* @created 12.06.2017
* @package chillerlan\Database\Query
* @author Smiley <[email protected]>
* @copyright 2017 Smiley
* @license MIT
*/
namespace chillerlan\Database\Query;
class CreateDatabaseAbstract extends StatementAbstract implements CreateDatabaseInterface{
protected $name;
protected $ifNotExists = false;
protected $collate = 'utf8';
public function ifNotExists():CreateDatabaseInterface{
$this->ifNotExists = true;
return $this;
}
public function name(string $dbname = null):CreateDatabaseInterface{
$name = trim($dbname);
if(!empty($name)){
$this->name = $name;
public function charset(string $collation):CreateDatabaseInterface{
$collation = trim($collation);
if(!empty($collation)){
$this->collate = $collation;