Reserved Names
In order to help out, DataMapper uses a series of functions and variable names in its operation. Because of this, some names cannot be used by a developer. The following is a list of reserved names that cannot be used as function names in your model or field names in your Database tables.
Functions
- DataMapper
- autoload
- recursive_require_once
- _load_extensions
- __set
- __get
- __call
- __clone
- __toString
- get
- save
- _save
- delete
- _delete
- delete_all
- refresh_all
- validate
- clear
- count
- exists
- query
- error_message
- get_clone
- get_copy
- _get_by
- _get_by_related
- add_table_name
- select
- select_max
- select_min
- select_avg
- select_sum
- distinct
- get_where
- where
- or_where
- _where
- where_in
- or_where_in
- where_not_in
- or_where_not_in
- _where_in
- like
- not_like
- or_like
- or_not_like
- _like
- group_by
- having
- or_having
- _having
- order_by
- limit
- offset
- start_cache
- stop_cache
- flush_cache
- trans_off
- trans_strict
- trans_start
- trans_complete
- trans_begin
- trans_status
- trans_commit
- trans_rollback
- _auto_trans_begin
- _auto_trans_complete
- _get_related_properties
- _add_related_table
- _related
- include_related
- join_related
- _get_relation
- _save_relation
- _delete_relation
- _get_relationship_table
- _count_related
- include_join_fields
- set_join_field
- _join_field
- _related_required
- _related_min_size
- _related_max_size
- _alpha_dash_dot
- _alpha_slash_dot
- _matches
- _min_date
- _max_date
- _min_size
- _max_size
- _unique
- _unique_pair
- _valid_date
- _valid_date_group
- _valid_match
- _encode_php_tags
- _prep_for_form
- _prep_url
- _strip_image_tags
- _xss_clean
- _to_array
- _to_object
- _refresh_stored_values
- _assign_libraries
- _load_languages
- _load_helpers
The following are variables that should only be used in your Models as described in this User Guide. For information on their use, read DataMapper Models.
Variables
- $_include_join_fields
- $all
- $auto_populate_has_many
- $auto_populate_has_one
- $auto_transaction
- $common
- $config
- $created_field
- $error
- $error_prefix
- $error_suffix
- $extensions
- $extensions_path
- $fields
- $global_extensions
- $has_many
- $has_one
- $join_prefix
- $local_time
- $model
- $parent
- $prefix
- $production_cache
- $query_related
- $stored
- $table
- $unix_timestamp
- $updated_field
- $valid
- $validated
- $validation
Important: The field names in your Database tables cannot be the same as these variables.