-
Notifications
You must be signed in to change notification settings - Fork 0
Email Model
This model defines automatic emails sent to users during their toolwatch adventure.
ADD_FIRST_WATCH : Send an email to registered users 48 hours after their sign up if they didn't add a watch
CHECK_ACCURACY : Send an email 24 hours after an user synchronized a watch to remind him to take the second measure
ADD_SECOND_WATCH : Send an email after this first completed measure if the user only has one registered watch
CHECK_ACCURACY_1_WEEK : 1 week after a completed measure, we remind the user to check the precision again
START_NEW_MEASURE : One month after a completed measure, we send a reminder to check the accuracy again
SIGN_UP : Classical email on signup (email of facebook)
RESET_PASSWORD : Send a new password to users
NEW_ACCURACY : Send an email after a complete measure with the measure accuracy. This is email has an .icc setting a calendar (iCal, Google Cal, ...) event. The event is for measuring the watch again in one month.
Automatic emails are cron based. A call to hooks/emails is made at fixed intervals.
Event emails are based on the observer pattern. This model observes other relevant model such as user of measure.
- Class name: Email
- Namespace:
- Parent class: MY_Model
public mixed $ADD_FIRST_WATCH = 1
Constantes for emails ids.
Theses ids are used to ensure that an email isn't sent twice for an user.
- Visibility: public
public mixed $CHECK_ACCURACY = 2
- Visibility: public
public mixed $ADD_SECOND_WATCH = 3
- Visibility: public
public mixed $START_NEW_MEASURE = 4
- Visibility: public
public mixed $COMEBACK = 5
- Visibility: public
public mixed $START_FIRST_MEASURE = 6
- Visibility: public
public mixed $CHECK_ACCURACY_1_WEEK = 7
- Visibility: public
public mixed $idToType = array("ADD_FIRST_WATCH", "CHECK_ACCURACY", "ADD_SECOND_WATCH", "START_NEW_MEASURE", "COMEBACK", "START_FIRST_MEASURE", "CHECK_ACCURACY_1_WEEK")
- Visibility: public
private mixed $hour = 3600
- Visibility: private
private mixed $day = 86400
- Visibility: private
private mixed $cancelledEmail = 1
- Visibility: private
private mixed $timeOffset
- Visibility: private
public string $error = ''
Stores custom errors that can be used in UI error reporting.
- Visibility: public
public string $table_name = ''
The name of the db table this model primarily uses.
- Visibility: public
protected string $key = 'id'
The primary key of the table. Used as the 'id' throughout.
- Visibility: protected
protected string $created_field = 'created_on'
Field name to use for the created time column in the DB table if $set_created is enabled
- Visibility: protected
protected string $modified_field = 'modified_on'
Field name to use for the modified time column in the DB table if $set_modified is enabled
- Visibility: protected
protected string $deleted_field = 'deleted'
Field name to use for the deleted column in the DB table if $soft_deletes is enabled
- Visibility: protected
protected boolean $set_created = false
Whether or not to auto-fill the $created_field on inserts.
- Visibility: protected
protected boolean $set_modified = false
Whether or not to auto-fill the $modified_field on updates.
- Visibility: protected
protected string $date_format = 'datetime'
The type of date/time field used for $created_field and $modified_field
Valid values are 'int', 'datetime', 'date'
- Visibility: protected
protected boolean $soft_deletes = false
If false, the delete() method will perform a delete of that row.
If true, the value in $deleted_field will be set to 1.
- Visibility: protected
protected string $selects = ''
Stores any selects here for use by the find* functions.
- Visibility: protected
protected boolean $escape = true
If false, the select() method will not try to protect your field or table names with backticks.
This is useful if you need a compound select statement.
- Visibility: protected
protected mixed $db_con = ''
DB Connection details (string or array)
- Visibility: protected
protected array $before_insert = array()
Observer Arrays
Each array can contain the names of callback functions within the extending model which will be called during each event.
$before_insert = array('set_created', 'validate_fields');
$before_insert contains the names of callback functions within the extending model which will be called before the insert method.
- Visibility: protected
protected array $after_insert = array()
Contains the names ozf callback functions within the extending model which will be called after the insert method
- Visibility: protected
protected array $before_update = array()
Contains the names of callback functions within the extending model which will be called before the update method
- Visibility: protected
protected array $after_update = array()
Contains the names of callback functions within the extending model which will be called after the update method
- Visibility: protected
protected array $before_find = array()
Contains the names of callback functions within the extending model which will be called before the find method
- Visibility: protected
protected array $after_find = array()
Contains the names of callback functions within the extending model which will be called after the find method
- Visibility: protected
protected array $before_union_all = array()
Contains the names of callback functions within the extending model which will be called before the union_all method
- Visibility: protected
protected array $after_union_all = array()
Contains the names of callback functions within the extending model which will be called after the union_all method
- Visibility: protected
protected array $before_delete = array()
Contains the names of callback functions within the extending model which will be called before the delete method
- Visibility: protected
protected array $after_delete = array()
Contains the names of callback functions within the extending model which will be called after the delete method
- Visibility: protected
protected array $empty_validation_rules = array()
Contains the names of callback functions within the extending model which will be called if $validation_rules is empty (or not an array) when requested via the get_validation_rules() method.
Note: These methods should not add $insert_validation_rules, as they are added to the $validation_rules after these functions return.
- Visibility: protected
protected array $protected_attributes = array()
Protected, non-modifiable attributes
- Visibility: protected
protected string $return_type = 'object'
By default, we return items as objects. You can change this for the entire class by setting this value to 'array' instead of 'object'.
Alternatively, you can do it on a per-instance basis using the 'as_array()' and 'as_object()' methods.
- Visibility: protected
protected string $temp_return_type = null
Holds the return type temporarily when using the as_array() and as_object() methods
- Visibility: protected
protected Array $validation_rules = array()
- Visibility: protected
protected Array $insert_validation_rules = array()
- Visibility: protected
protected boolean $skip_validation = false
- Visibility: protected
protected boolean $return_insert_id = true
- Visibility: protected
protected Array $field_info = array()
- Visibility: protected
protected array $pending_selects = array()
This array will be populated with selects and mainly use for union based query.
- Visibility: protected
void CI_Model::__construct()
Class constructor
- Visibility: public
- This method is defined by CI_Model
mixed Email::updateObserver(\MY_MODEL $subject, String $event, Array $data)
Obverved model call this method one something noticieable happen on their side. This method will send event emails
- Visibility: public
- $subject MY_MODEL - <p>An instance of the model calling</p>
- $event String - <p>Which event has been triggered</p>
- $data Array - <p>data related to the event</p>
Array Email::cronCheck($timeOffset)
Check which emails should be sent now according to the email specifications
- Visibility: public
- $timeOffset mixed - <p>seconds to add or retrieve to time().</p>
mixed Email::showSentEmails(Array $emails, String $title)
Convenient function to display the emails being generated by cronCheck
- Visibility: private
- $emails Array
- $title String - <p>A nice title to distinguish between email types</p>
mixed Email::insertAll(Array $array, \MY_MODEL $model)
Helper method to batch insert in a model
- Visibility: private
- $array Array - <p>data to batch insert</p>
- $model MY_MODEL - <p>Model to insert</p>
Array Email::sendMandrillEmail(String $subject, \html $content, String $recipientName, String $recipientEmail, String $tags, String $sendAt, \Base64 $attachments)
Send an email throught the mandrill api
- Visibility: private
- $subject String
- $content html
- $recipientName String
- $recipientEmail String
- $tags String - <p>One tag for the email to see it in the Mandrill backend</p>
- $sendAt String - <p>The date at which to send the email</p>
- $attachments Base64 - <p>A Base64 representation of an attachment</p>
String Email::sendAtString(\Long $scheduleTime)
Helper method to convert a timestamp in a Mandrill valid string
- Visibility: private
- $scheduleTime Long - <p>timestamp</p>
String Email::whereNotAlreadySentUser(integer $emailType)
Helper thate created a subquery on email_user and emailType
- Visibility: private
- $emailType integer - <p>The type of the email to look for</p>
String Email::whereNotAlreadySentWatch(integer $emailType)
Helper thate created a subquery on email_watch and emailType
- Visibility: private
- $emailType integer - <p>The type of the email to look for</p>
String Email::whereNotAlreadySentMeasure(integer $emailType)
Helper thate created a subquery on email_measure and emailType
- Visibility: private
- $emailType integer - <p>The type of the email to look for</p>
mixed Email::addEmailToQueue(Array $queue, integer $userId, integer $emailType, \long $time, integer $idTitle, \html $content, array $mandrillResponse)
Add a computed email to a $queue.
- Visibility: private
- $queue Array - <p>Received by reference and will be updated</p>
- $userId integer
- $emailType integer
- $time long
- $idTitle integer
- $content html
- $mandrillResponse array
mixed Email::inactiveUser(\long $time, array $queuedEmail)
Send email to incative user
- Visibility: private
- $time long - <p>Time at which compute the rule</p>
- $queuedEmail array - <p>queue to store the computed email</p>
mixed Email::userWithoutWatch(\long $time, array $queuedEmail)
Send email to user who don't have any watch
- Visibility: private
- $time long - <p>Time at which compute the rule</p>
- $queuedEmail array - <p>queue to store the computed email</p>
mixed Email::userWithWatchWithoutMeasure(\long $time, array $queuedEmail)
Send email to user witch a watch but without measure
- Visibility: private
- $time long - <p>Time at which compute the rule</p>
- $queuedEmail array - <p>queue to store the computed email</p>
mixed Email::userWithOneCompleteMeasureAndOneWatch(\long $time, array $queuedEmail)
Send email to user With One Complet eMeasure And One Watch
- Visibility: private
- $time long - <p>Time at which compute the rule</p>
- $queuedEmail array - <p>queue to store the computed email</p>
mixed Email::checkAccuracy(\long $time, array $queuedEmail)
Send email to user that need to check their accuracy
- Visibility: private
- $time long - <p>Time at which compute the rule</p>
- $queuedEmail array - <p>queue to store the computed email</p>
mixed Email::checkAccuracyOneWeek(\long $time, array $queuedEmail)
Send email to user to check their accuracy 1 week after
- Visibility: private
- $time long - <p>Time at which compute the rule</p>
- $queuedEmail array - <p>queue to store the computed email</p>
mixed Email::startANewMeasure(\long $time, array $queuedEmail)
Send email to user to start a new measure
- Visibility: private
- $time long - <p>Time at which compute the rule</p>
- $queuedEmail array - <p>queue to store the computed email</p>
Array Email::signup(\User $user)
Send the welcome email
- Visibility: private
- $user User - <p>The newly created user</p>
mixed Email::resetPassword(\User $user, String $token)
Send a password token for reset $user
- Visibility: private
- $user User
- $token String
mixed Email::newResult(\Measure $measure)
Send an email with the result of a measure
- Visibility: private
- $measure Measure
mixed MY_Model::find(string $id)
Search for a single row in the database.
- Visibility: public
- This method is defined by MY_Model
- $id string - <p>The primary key of the record to search for.</p>
mixed MY_Model::find_all()
Returns all records in the table.
By default, there is no 'where' clause, but the where clause can be set by using either CodeIgniter's Active Record functions before calling this function, or through method chaining with the model's where() method.
- Visibility: public
- This method is defined by MY_Model
mixed MY_Model::find_union_all()
Returns all of unions, the $pending_selects value has to be populated trhought the union conveniant method
- Visibility: public
- This method is defined by MY_Model
boolean|mixed MY_Model::find_all_by(mixed $field, mixed $value, string $type)
A convenience method that combines a where() and find_all() call into a single call.
- Visibility: public
- This method is defined by MY_Model
- $field mixed - <p>The table field to search in.</p>
- $value mixed - <p>The value that field should be.</p>
- $type string - <p>The type of where clause to create: 'and' or 'or'.</p>
boolean|mixed MY_Model::find_by(string $field, string $value, string $type)
Returns the first result that matches the field/values passed.
- Visibility: public
- This method is defined by MY_Model
- $field string - <p>Either a string or an array of fields to match against. If an array is passed it, the $value parameter is ignored since the array is expected to have key/value pairs in it.</p>
- $value string - <p>The value to match on the $field. Only used when $field is a string.</p>
- $type string - <p>The type of where clause to create: 'and' or 'or'.</p>
boolean|mixed MY_Model::insert(array $data)
Insert a row of data into the database.
- Visibility: public
- This method is defined by MY_Model
- $data array - <p>an array of key/value pairs to insert.</p>
boolean MY_Model::insert_batch(array $data)
Perform a batch insert of data into the database.
- Visibility: public
- This method is defined by MY_Model
- $data array - <p>an array of key/value pairs to insert.</p>
boolean MY_Model::update_table(mixed $where, array $data, $table)
Update an existing row in the database.
- Visibility: public
- This method is defined by MY_Model
- $where mixed - <p>The primary_key value of the row to update, or an array to use for the where clause.</p>
- $data array - <p>An array of key/value pairs to update.</p>
- $table mixed
boolean MY_Model::update(mixed $where, array $data)
Update an existing row in the database.
- Visibility: public
- This method is defined by MY_Model
- $where mixed - <p>The primary_key value of the row to update, or an array to use for the where clause.</p>
- $data array - <p>An array of key/value pairs to update.</p>
boolean MY_Model::increment(mixed $where, $field)
Increment a field. Mostly use for views, likes and so on.
- Visibility: public
- This method is defined by MY_Model
- $where mixed - <p>The primary_key value of the row to update, or an array to use for the where clause.</p>
- $field mixed
boolean MY_Model::decrement(mixed $where, $field)
Decrement a field. Mostly use for views, likes and so on.
- Visibility: public
- This method is defined by MY_Model
- $where mixed - <p>The primary_key value of the row to update, or an array to use for the where clause.</p>
- $field mixed
boolean MY_Model::update_where(string $field, string $value, array $data)
A convenience method that allows use of any field/value pair as the 'where' portion of an update.
- Visibility: public
- This method is defined by MY_Model
- $field string - <p>The field to match on.</p>
- $value string - <p>The value to search the $field for.</p>
- $data array - <p>An array of key/value pairs to update.</p>
boolean MY_Model::update_batch(array $data, string $index)
Updates a batch of existing rows in the database.
- Visibility: public
- This method is defined by MY_Model
- $data array - <p>An array of key/value pairs to update.</p>
- $index string - <p>The name of the db column to use as the where key</p>
boolean MY_Model::delete(mixed $id)
Delete the record with the specified primary key value.
If $this->soft_deletes is true, it will attempt to set $this->deleted_field on the specified record to '1', to allow the data to remain in the database.
- Visibility: public
- This method is defined by MY_Model
- $id mixed - <p>The primary_key value to match against.</p>
boolean MY_Model::delete_where($where)
Delete the record(s) specified by the given field/value pair(s).
Performs a delete using the field/value pair(s) as the 'where' portion of the delete statement.
If $this->soft_deletes is true, it will attempt to set $this->deleted_field on the specified record(s) to '1', to allow the data to remain in the database.
- Visibility: public
- This method is defined by MY_Model
- $where mixed
boolean MY_Model::is_unique(string $field, string $value)
Check whether a field/value pair exists within the table.
- Visibility: public
- This method is defined by MY_Model
- $field string - <p>The name of the field to search</p>
- $value string - <p>The value to match $field against.</p>
boolean|integer MY_Model::count_by(string $field, string $value)
Return the number of elements that match the field/value pair.
- Visibility: public
- This method is defined by MY_Model
- $field string - <p>The field to search for.</p>
- $value string - <p>The value to match $field against.</p>
boolean|mixed MY_Model::get_field(mixed $id, string $field)
A convenience method to return only a single field of the specified row.
- Visibility: public
- This method is defined by MY_Model
- $id mixed - <p>The primary_key value to match against.</p>
- $field string - <p>The field to search for.</p>
array MY_Model::format_dropdown()
A convenience method to return options for form dropdown menus.
Can pass either Key ID and Label Table names or Just Label Table name.
- Visibility: public
- This method is defined by MY_Model
\FF_Model MY_Model::where(mixed $field, string $value, $escape)
Sets the where portion of the query in a chainable format.
- Visibility: public
- This method is defined by MY_Model
- $field mixed - <p>The field to search the db on. Can be either a string with the field name to search, or an associative array of key/value pairs.</p>
- $value string - <p>The value to match the field against. If $field is an array, this value is ignored.</p>
- $escape mixed
\FF_Model MY_Model::order_by(mixed $field, string $order)
Inserts a chainable order_by method from either a string or an array of field/order combinations.
If the $field value is an array, it should look like:
array( 'field1' => 'asc', 'field2' => 'desc' );
- Visibility: public
- This method is defined by MY_Model
- $field mixed - <p>The field to order the results by, or an array of field/order pairs.</p>
- $order string - <p>The direction to order the results ('asc' or 'desc')</p>
\FF_Model MY_Model::soft_delete(boolean $val)
Set the value of the soft deletes flag.
$this->my_model->soft_delete(true)->delete($id);
- Visibility: public
- This method is defined by MY_Model
- $val boolean - <p>If true, will temporarily use soft_deletes.</p>
\FF_Model MY_Model::as_array()
Temporarily set the return type to an array.
- Visibility: public
- This method is defined by MY_Model
\FF_Model MY_Model::as_object()
Temporarily sets the return type to an object.
- Visibility: public
- This method is defined by MY_Model
\FF_Model MY_Model::as_json()
Temporarily sets the object return to a json object.
- Visibility: public
- This method is defined by MY_Model
\FF_Model MY_Model::return_insert_id(Bool $return)
Sets the value of the return_insert_id flag
- Visibility: public
- This method is defined by MY_Model
- $return Bool - <p>(optional) whether insert will return the ID</p>
\FF_Model MY_Model::skip_validation(Bool $skip)
Sets the value of the skip_validation flag
- Visibility: public
- This method is defined by MY_Model
- $skip Bool - <p>(optional) whether to skip validation in the model</p>
array MY_Model::created_on(array $row)
Sets the created date for the row
Uses the current date/time, the model's date_format, and places the value in the model's created_field. Will not overwrite existing.
- Visibility: public
- This method is defined by MY_Model
- $row array - <p>The array of data to be inserted</p>
array MY_Model::modified_on(array $row)
Sets the modified date for the row
Uses the current date/time, the model's date_format, and places the value in the model's modified_field. Will not overwrite existing.
- Visibility: public
- This method is defined by MY_Model
- $row array - <p>The array of data to be inserted</p>
mixed MY_Model::trigger(string $event, mixed $data)
Triggers a model-specific event and calls each of its observers.
- Visibility: public
- This method is defined by MY_Model
- $event string - <p>The name of the event to trigger</p>
- $data mixed - <p>The data to be passed to the callback functions.</p>
array MY_Model::get_validation_rules(String $type)
Get the validation rules for the model
- Visibility: public
- This method is defined by MY_Model
- $type String - <p>The type of validation rules to retrieve: 'update' or 'insert'. If 'insert', appends rules set in $insert_validation_rules.</p>
\array/bool MY_Model::validate(array $data, string $type)
Validate the $data passed into it
Uses the form_validation rules setup in $this->validation_rules.
If $type == 'insert', any additional rules in $insert_validation_rules for that field will be added to the rules.
- Visibility: public
- This method is defined by MY_Model
- $data array - <p>An array of data to validate</p>
- $type string - <p>Either 'update' or 'insert'.</p>
mixed MY_Model::protect_attributes(\object/array $row)
Protect attributes by removing them from $row array.
Useful for removing the primary key, or submit button names if $_POST is thrown at the model.
- Visibility: public
- This method is defined by MY_Model
- $row object/array - <p>The value pair item to remove.</p>
integer|null|string MY_Model::set_date(mixed $user_date)
A utility function to allow child models to use the type of date/time format that they prefer. This is primarily used for setting created_on and modified_on values, but can be used for other fields as well.
The available time formats are:
-
'int' - Stores the date as an integer timestamp.
-
'datetime' - Stores the date and time in the SQL datetime format.
-
'date' - Stores teh date (only) in the SQL date format.
-
Visibility: protected
-
This method is defined by MY_Model
- $user_date mixed - <p>An optional PHP timestamp to be converted.</p>
string MY_Model::_return_type($multi)
Return the method name for the current return type
- Visibility: protected
- This method is defined by MY_Model
- $multi mixed
string MY_Model::get_db_error_message()
Retrieve error messages from the database
- Visibility: protected
- This method is defined by MY_Model
void MY_Model::set_table(string $table)
Allows setting the table to use for all methods during runtime.
- Visibility: public
- This method is defined by MY_Model
- $table string - <p>The table name to use (do not include the prefix!)</p>
string MY_Model::get_table()
Get the table name
- Visibility: public
- This method is defined by MY_Model
string MY_Model::get_key()
Get the table's primary key
- Visibility: public
- This method is defined by MY_Model
String MY_Model::get_created_by_field()
Get the name of the created by field
- Visibility: public
- This method is defined by MY_Model
String MY_Model::get_created_field()
Get the name of the created field
- Visibility: public
- This method is defined by MY_Model
String MY_Model::get_deleted_field()
Get the name of the deleted field
- Visibility: public
- This method is defined by MY_Model
String MY_Model::get_deleted_by_field()
Get the name of the deleted by field
- Visibility: public
- This method is defined by MY_Model
array MY_Model::get_field_info()
Get the metadata for the model's database fields
Returns the model's database field metadata stored in $this->field_info if set, else it tries to retrieve the metadata from $this->db->field_data($this->table_name);
- Visibility: public
- This method is defined by MY_Model
String MY_Model::get_modified_by_field()
Get the name of the modified by field
- Visibility: public
- This method is defined by MY_Model
String MY_Model::get_modified_field()
Get the name of the modified field
- Visibility: public
- This method is defined by MY_Model
boolean MY_Model::set_date_format(string $format)
Sets the date_format to use for setting created_on and modified_on values.
- Visibility: public
- This method is defined by MY_Model
- $format string - <p>String describing format. Valid values are: 'int', 'datetime', 'date'</p>
boolean MY_Model::set_modified(boolean $modified)
Sets whether to auto-create modified_on dates in the update method.
- Visibility: public
- This method is defined by MY_Model
- $modified boolean
boolean MY_Model::set_soft_deletes(boolean $soft)
Sets whether soft deletes are used by the delete method.
- Visibility: public
- This method is defined by MY_Model
- $soft boolean
mixed MY_Model::logit(string $message, string $level)
Logs an error to the Console (if loaded) and to the log files.
- Visibility: protected
- This method is defined by MY_Model
- $message string - <p>The string to write to the logs.</p>
- $level string - <p>The log level, as per CI log_message method.</p>
Array MY_Model::prep_data(Array $post_data)
Extracts the model's fields (except the key and those handled by Observers) from the $post_data and returns an array of name => value pairs
- Visibility: public
- This method is defined by MY_Model
- $post_data Array - <p>The post data, usually $this->input->post() when called from the controller</p>
mixed MY_Model::raw_sql($sql)
- Visibility: public
- This method is defined by MY_Model
- $sql mixed
mixed MY_Model::select($select, $escape)
- Visibility: public
- This method is defined by MY_Model
- $select mixed
- $escape mixed
mixed MY_Model::select_max($select, $alias)
- Visibility: public
- This method is defined by MY_Model
- $select mixed
- $alias mixed
mixed MY_Model::select_min($select, $alias)
- Visibility: public
- This method is defined by MY_Model
- $select mixed
- $alias mixed
mixed MY_Model::select_avg($select, $alias)
- Visibility: public
- This method is defined by MY_Model
- $select mixed
- $alias mixed
mixed MY_Model::select_sum($select, $alias)
- Visibility: public
- This method is defined by MY_Model
- $select mixed
- $alias mixed
mixed MY_Model::distinct($val)
- Visibility: public
- This method is defined by MY_Model
- $val mixed
mixed MY_Model::from($from)
- Visibility: public
- This method is defined by MY_Model
- $from mixed
mixed MY_Model::join($table, $cond, $type)
- Visibility: public
- This method is defined by MY_Model
- $table mixed
- $cond mixed
- $type mixed
mixed MY_Model::union($select)
- Visibility: public
- This method is defined by MY_Model
- $select mixed
mixed MY_Model::or_where($key, $value, $escape)
- Visibility: public
- This method is defined by MY_Model
- $key mixed
- $value mixed
- $escape mixed
mixed MY_Model::where_in($key, $values)
- Visibility: public
- This method is defined by MY_Model
- $key mixed
- $values mixed
mixed MY_Model::or_where_in($key, $values)
- Visibility: public
- This method is defined by MY_Model
- $key mixed
- $values mixed
mixed MY_Model::where_not_in($key, $values)
- Visibility: public
- This method is defined by MY_Model
- $key mixed
- $values mixed
mixed MY_Model::or_where_not_in($key, $values)
- Visibility: public
- This method is defined by MY_Model
- $key mixed
- $values mixed
mixed MY_Model::like($field, $match, $side)
- Visibility: public
- This method is defined by MY_Model
- $field mixed
- $match mixed
- $side mixed
mixed MY_Model::nto_like($field, $match, $side)
- Visibility: public
- This method is defined by MY_Model
- $field mixed
- $match mixed
- $side mixed
mixed MY_Model::or_like($field, $match, $side)
- Visibility: public
- This method is defined by MY_Model
- $field mixed
- $match mixed
- $side mixed
mixed MY_Model::or_not_like($field, $match, $side)
- Visibility: public
- This method is defined by MY_Model
- $field mixed
- $match mixed
- $side mixed
mixed MY_Model::group_by($by)
- Visibility: public
- This method is defined by MY_Model
- $by mixed
mixed MY_Model::having($key, $value, $escape)
- Visibility: public
- This method is defined by MY_Model
- $key mixed
- $value mixed
- $escape mixed
mixed MY_Model::or_having($key, $value, $escape)
- Visibility: public
- This method is defined by MY_Model
- $key mixed
- $value mixed
- $escape mixed
mixed MY_Model::limit($value, $offset)
- Visibility: public
- This method is defined by MY_Model
- $value mixed
- $offset mixed
mixed MY_Model::offset($offset)
- Visibility: public
- This method is defined by MY_Model
- $offset mixed
mixed MY_Model::set($key, $value, $escape)
- Visibility: public
- This method is defined by MY_Model
- $key mixed
- $value mixed
- $escape mixed
mixed MY_Model::affected_rows()
- Visibility: public
- This method is defined by MY_Model
mixed MY_Model::last_query()
- Visibility: public
- This method is defined by MY_Model
mixed MY_Model::truncate()
- Visibility: public
- This method is defined by MY_Model
mixed MY_Model::inserted_id()
- Visibility: public
- This method is defined by MY_Model
mixed CI_Model::__get(string $key)
__get magic
Allows models to access CI's loaded classes using the same syntax as controllers.
- Visibility: public
- This method is defined by CI_Model
- $key string