mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-13 23:28:39 +00:00
Fix docblocks
This commit is contained in:
parent
e616f844ab
commit
857970c230
|
|
@ -18,9 +18,7 @@ use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
|
||||||
use phpOMS\DataStorage\Database\Schema\Builder;
|
use phpOMS\DataStorage\Database\Schema\Builder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Database type enum.
|
* Database schema mapper.
|
||||||
*
|
|
||||||
* Database types that are supported by the application
|
|
||||||
*
|
*
|
||||||
* @package phpOMS\DataStorage\Database
|
* @package phpOMS\DataStorage\Database
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
|
|
@ -42,6 +40,13 @@ class SchemaMapper
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all tables of database
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getTables() : array
|
public function getTables() : array
|
||||||
{
|
{
|
||||||
$builder = new Builder($this->db);
|
$builder = new Builder($this->db);
|
||||||
|
|
@ -55,6 +60,15 @@ class SchemaMapper
|
||||||
return $tables;
|
return $tables;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get table by name
|
||||||
|
*
|
||||||
|
* @param string $name Name of the table
|
||||||
|
*
|
||||||
|
* @return Table
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getTable(string $name) : Table
|
public function getTable(string $name) : Table
|
||||||
{
|
{
|
||||||
$table = new Table();
|
$table = new Table();
|
||||||
|
|
@ -62,6 +76,15 @@ class SchemaMapper
|
||||||
return $table;
|
return $table;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fields of table
|
||||||
|
*
|
||||||
|
* @param string $table Name of the table
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getFields(string $table) : array
|
public function getFields(string $table) : array
|
||||||
{
|
{
|
||||||
$builder = new Builder($this->db);
|
$builder = new Builder($this->db);
|
||||||
|
|
@ -75,6 +98,16 @@ class SchemaMapper
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get field of table
|
||||||
|
*
|
||||||
|
* @param string $table Name of the table
|
||||||
|
* @param string $name Name of the field
|
||||||
|
*
|
||||||
|
* @return Field
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getField(string $table, string $name) : Field
|
public function getField(string $table, string $name) : Field
|
||||||
{
|
{
|
||||||
$field = new Field();
|
$field = new Field();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user