TwistPHP Documentation

TableStructure

File path: dist/twist/Core/Models/Database/TableStructure.model.php
Namespace: Twist\Core\Models\Database
Extends:

Type: Model

TableStructure — Simply create tables in an object orientated way with no need to write a mysql query

Example Usage

<?php
//Set the variables for the example
$strTable 'foo';
$strDatabase null;

//Call the function copyTo with the example vars
$resTableStructure = new \Twist\Core\Models\Database\TableStructure();
$resTableStructure -> copyTo($strTable$strDatabase);

Method List

Method Access Returns
__constructconstructvoid
__destructpublicvoid
copyTopublicvoid
collationpublicvoid
charsetpublicvoid
enginepublicvoid
commentpublicvoid
autoIncrementpublicvoid
primaryKeypublicvoid
addUniqueKeypublicvoid
addIndexpublicvoid
addFieldpublicvoid
setFieldOrderpublicvoid
commitpublicvoid
sqlpublicvoid
generatePrimaryKeyprotectedvoid
generateUniqueKeyprotectedvoid
generateIndexesprotectedvoid
generateFieldListprotectedvoid