Autogenerated. Do not modify. Modify SQL table, then run oneOffScripts\generateCRUD.php table_name
- property int $migrationId MySQL type int(11)
- property \PHPFUI\ORM\Record\Migration $migration related record
- property string $ran MySQL type timestamp
- Extends
- Children
- Implements
ArrayAccess
Constants |
public PHPFUI |
public PHPFUI |
public PHPFUI |
public PHPFUI |
public PHPFUI |
Methods |
public PHPFUI\ORM\Record::__construct(PHPFUI Construct a CRUD object Reads from the database based on the parameters passed to the constructor. No parameters creates an empty object. Possible $parameter types and values
|
public PHPFUI\ORM\Record::__get(string $field) : ?mixed Allows for $object->field syntax Unset fields will return null |
public PHPFUI\ORM\Record::__isset(string $field) : bool Allows for empty($object->field) to work correctly |
public PHPFUI\ORM\Record::__set(string $field, ?mixed $value) : void |
public static PHPFUI\ORM\Record::addDisplayTransform(string $field, callable $callback) : void Add a transform for get. Callback is passed value. |
public PHPFUI\ORM\Record::addSetTransform(string $field, callable $callback) : static Add a transform for set. Callback is passed value. |
public PHPFUI\ORM\Record::blankDate(?string $date) : string |
public PHPFUI\ORM\Record::clean() : static clean is called before insert or update. Override to impliment cleaning on a specific record |
public PHPFUI\ORM\Record::create() : int Alias of insert |
public PHPFUI\ORM\Record::delete() : bool Deletes the record (and children) currently pointed to by the data
|
public PHPFUI\ORM\Record::displayTransform(string $field, ?mixed $value = NULL) : ?mixed Transform a field for display |
public PHPFUI\ORM\Record::empty() : bool
|
public PHPFUI\ORM\Record::getAutoIncrement() : bool
|
public static PHPFUI\ORM\Record::getFields() : array
|
public PHPFUI\ORM\Record::getLength(string $field) : int
|
public static PHPFUI\ORM\Record::getPrimaryKeys() : array
|
public PHPFUI\ORM\Record::getPrimaryKeyValues() : array
|
public static PHPFUI\ORM\Record::getTableName() : string
|
public static PHPFUI\ORM\Record::getVirtualFields() : array Get the virtual field names
|
public PHPFUI\ORM\Record::insert() : int|bool Inserts current data into table
|
public PHPFUI\ORM\Record::insertOrIgnore() : int|bool Inserts current data into table or ignores duplicate key if found
|
public PHPFUI\ORM\Record::insertOrUpdate() : int|bool Inserts current data into table or updates if duplicate key
|
public PHPFUI\ORM\DataObject::isset(string $field) : bool |
public PHPFUI\ORM\Record::loaded() : bool
|
public PHPFUI\ORM\Record::loadFromSQL(string $sql, array $input = []) : bool Load first from SQL query
|
public PHPFUI\ORM\DataObject::offsetExists( $offset) : bool |
public PHPFUI\ORM\Record::offsetGet( $offset) : ?mixed Low level get access to underlying data to implement ArrayAccess |
public PHPFUI\ORM\Record::offsetSet( $offset, $value) : void Low level set access to underlying data to implement ArrayAccess |
public PHPFUI\ORM\DataObject::offsetUnset( $offset) : void |
public PHPFUI\ORM\Record::read(array|string|int $fields) : bool Read a record from the db. If more than one match, only the first is loaded.
|
public PHPFUI\ORM\Record::reload() : bool Reload the object from the database. Unsaved fields are discarded. |
public PHPFUI\ORM\Record::save() : int|bool Save the record, will either update if it exists or insert if not |
public PHPFUI\ORM\Record::setCustomValidator(string $className) : static Set a custom validator class |
public PHPFUI\ORM\Record::setEmpty() : static Sets all fields to default values |
public PHPFUI\ORM\Record::setFrom(array $values, bool $loaded = false) : static Sets the object to values in the array. Invalid array values are ignored.
|
public PHPFUI\ORM\DataObject::toArray() : array
|
public PHPFUI\ORM\Record::update() : bool Update the database with the current record based on table primary key |
public PHPFUI\ORM\Record::validate(string $optionalMethod = '', ?self $originalRecord = NULL) : array
|
Properties |
protected static bool $autoIncrement = false |
protected array PHPFUI\ORM\DataObject::$current |
protected static bool PHPFUI\ORM\Record::$deleteChildren = true |
protected static array PHPFUI\ORM\Record::$displayTransforms = []
|
protected bool PHPFUI\ORM\Record::$empty = true |
protected static array $fields = ['migrationId' => ['int(11)', 'int', 11, false, NULL], 'ran' => ['timestamp', 'string', 20, false, NULL]]
|
protected bool PHPFUI\ORM\Record::$loaded = false |
protected static array $primaryKeys = ['migrationId']
|
protected static array PHPFUI\ORM\Record::$setTransforms = []
|
protected static string $table = 'migration' |
protected string PHPFUI\ORM\Record::$validator = '' |
protected static array PHPFUI\ORM\Record::$virtualFields = []
|
Methods |
protected PHPFUI\ORM\Record::cleanEmail(string $field) : static Lowercases and strips invalid email characters. Does not validate email address. |
protected PHPFUI\ORM\Record::cleanFloat(string $field, int $decimalPoints = 2) : static removes all non-digits (0-9, . and -) |
protected PHPFUI\ORM\Record::cleanLowerCase(string $field) : static Converts the field to all lower case |
protected PHPFUI\ORM\Record::cleanNumber(string $field) : static removes all non-digits (0-9 and -) from string representation of a number |
protected PHPFUI\ORM\Record::cleanPhone(string $field, string $regExSeparators = '\-\. ') : static removes all invalid characters. (0-9) and regex separators are valid. |
protected PHPFUI\ORM\Record::cleanProperName(string $field) : static Properly capitalizes proper names if in single case. Mixed case strings are not altered. |
protected PHPFUI\ORM\Record::cleanUpperCase(string $field) : static Converts the field to all upper case |
protected PHPFUI\ORM\Record::timeStamp(?int $timeStamp) : string |
Properties |
protected static bool $autoIncrement = false |
protected static bool PHPFUI\ORM\Record::$deleteChildren = true |
protected static array PHPFUI\ORM\Record::$displayTransforms = []
|
protected static array $fields = ['migrationId' => ['int(11)', 'int', 11, false, NULL], 'ran' => ['timestamp', 'string', 20, false, NULL]]
|
protected static array $primaryKeys = ['migrationId']
|
protected static array PHPFUI\ORM\Record::$setTransforms = []
|
protected static string $table = 'migration' |
protected static array PHPFUI\ORM\Record::$virtualFields = []
|
Methods |
public static PHPFUI\ORM\Record::addDisplayTransform(string $field, callable $callback) : void Add a transform for get. Callback is passed value. |
public static PHPFUI\ORM\Record::getFields() : array
|
public static PHPFUI\ORM\Record::getPrimaryKeys() : array
|
public static PHPFUI\ORM\Record::getTableName() : string
|
public static PHPFUI\ORM\Record::getVirtualFields() : array Get the virtual field names
|