[activerecord] element index

Package indexes

All elements
a b c d e f g h i l m n o p q r s t u v w _
_
top
Method __call
Allow dynamic use of accessor and mutator methods for column values. Accessors follow the format column_name() and mutators follow the format set_column_name($arg).
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __construct
Constructor
Method __get
Allow reading of attributes and reader methods as properties
Method __isset
Allow use of isset with record attributes as though they were public properties. Unlike other access to properties, this will not defer to to existing reader methods, only actual record properties can be tested.
Method __set
Allow writing of attributes and use of set methods as properties
Method __sleep
Discard meta data and database connections not specific to this
Method __unset
Allow use of unset with record attributes as though they were public properties. Unlike other access to properties, this will not defer to to existing set methods, only actual record properties can be unset.
a
top
Variable $accessible_attributes
Variable $allowNull
Flag indicating whether nulls are allowed
Variable $allowNull
Flag indicating whether nulls are allowed
Variable $allowNull
Flag indicating whether nulls are allowed
Variable $allowNull
Flag indicating whether nulls are allowed
Variable $allowNull
Flag indicating whether nulls are allowed
Variable $associates
Variable $association
Variable $associationName
Variable $associations
Variable $attributes
Variable $attributes
Attributes
Variable $attrNames
List of attribute names to validate
Variable $attrNames
List of attribute names to validate
Variable $attrNames
List of attribute names to validate
Variable $attrNames
List of attribute names to validate
Variable $attrNames
List of attribute names to validate
Variable $attrNames
List of attribute names to validate
Variable $attrNames
List of attribute names to validate
Method accessible_attributes
Return a list of all attributes which have been made accessible to mass assignment by passing them to attr_accessible (the list is always maintained in sorted order).
Page Association.php
Association.php in Association.php
Class ActiveRecord_Association
ActiveRecord_Association in Association.php
ActiveRecord_Association is the base class from which all association implementations inherit.
Class ActiveRecord_AssociationTypeMismatch
Thrown when an attempt is made to assign an invalid type to an association
Class ActiveRecord_Association_BelongsTo
Implements the belongs_to association
Class ActiveRecord_Association_BelongsToKeyValidation
A validation for the foreign key field on a belongs_to relationship
Class ActiveRecord_Association_Collection
The collection of associates in a has many association. In addition to the documented methods, the collection object may be treated as an array (iterated over, accessed with square brackets, etc.).
Class ActiveRecord_Association_HasMany
Implements the has_many association
Class ActiveRecord_Association_HasOne
Implements the has_one association
Class ActiveRecord_Base
ActiveRecord_Base in Base.php
An ActiveRecord implementation for PHP 5.
Class ActiveRecord_BoundsValidation
A validation to check that an attribute's string length is within a certain range.
Class ActiveRecord_Column
ActiveRecord_Column in Column.php
A class containing information about a table column.
Class ActiveRecord_ConfirmationValidation
A validation to check that a confirmation attribute for an
Class ActiveRecord_Connection
ActiveRecord_Connection in Connection.php
ActiveRecord_Connection extends PDO to provide some additional functionality required by ActiveRecord that may vary by database.
Class ActiveRecord_Connection_Default
Default implementation of ActiveRecord_Connection
Class ActiveRecord_Connection_Mysql
ActiveRecordConnection for MySQL
Class ActiveRecord_Connection_Provider
ActiveRecord implementation of Support_Resources_DBProvider. This differs from the default implementation only in that it returns an instance of ActiveRecord_Connection instead of a plain PDO instance.
Class ActiveRecord_Connection_Sqlite
ActiveRecord_Connection for SQLite
Class ActiveRecord_Error
ActiveRecord_Error in Base.php
Base class for ActiveRecord exceptions
Class ActiveRecord_Errors
ActiveRecord_Errors in Errors.php
Errors collection class for ActiveRecord. Every ActiveRecord instance has a corresponding ActiveRecord_Errors instance, even if no errors exist for the object.
Class ActiveRecord_IncorrectArgumentCountError
Thrown if a call is make with an incorrect number of arguments
Class ActiveRecord_InfoMgr
ActiveRecord_InfoMgr in InfoMgr.php
ActiveRecord_InfoMgr is a helper class to manage meta information for active record classes. This allows information such as column mappings, associations, etc. to be gathered once per class and shared between instances.
Class ActiveRecord_Invalid
Thrown if a record could not be saved to the database due to validation.
Class ActiveRecord_MetaInfo
ActiveRecord_MetaInfo is a structure to hold meta information for
Class ActiveRecord_NotFoundError
Thrown if a required record was not found
Class ActiveRecord_NotSaved
Thrown if a record could not be successfully saved to the database.
Class ActiveRecord_NumericValidation
A validation to check that an attribute's value is numeric.
Class ActiveRecord_PresentValidation
A validation to check that an attribute is non-empty (as determined by the PHP function empty()).
Class ActiveRecord_Proxy
ActiveRecord_Proxy in Proxy.php
ActiveRecord_Proxy allows for limited access to some protected methods of an ActiveRecord object. See ActiveRecord_Base::add_method_proxy() for more information.
Class ActiveRecord_ProxyMethod
ActiveRecord_ProxyMethod in ProxyMethod.php
ActiveRecord_ProxyMethod encapsulates a proxied method for an ActiveRecord object. See ActiveRecord_Base::add_method_proxy() for more information.
Class ActiveRecord_ReadOnlyRecord
Thrown if an attempt is made to save a read-only record
Class ActiveRecord_RegExValidation
A validation to check that an attribute's value conforms to a regular expression.
Class ActiveRecord_SequencesNotSupportedError
Indicates an attempt to use a sequence on a connection that does not support them.
Class ActiveRecord_SetValidation
ActiveRecord_SetValidation in Validation.php
A validation to check that an attribute's value is contained in a specified list.
Class ActiveRecord_SubclassNotFound
Thrown if a required subclass could not be found
Class ActiveRecord_UniqueValidation
A validation to check that an attribute's value is unique.
Class ActiveRecord_UnknownAssociationError
Thrown if a reference is made to a non-existent association
Class ActiveRecord_UnknownMethodError
Thrown if an attempt is made to access a non-existent method
Class ActiveRecord_UnknownOptionError
Thrown if an invalid option key is supplied
Class ActiveRecord_UnknownPropertyError
Thrown if an attempt is made to access a non-existent property
Class ActiveRecord_Validation
ActiveRecord_Validation in Validation.php
ActiveRecord_Validation is an interface for objects that can perform validations on an ActiveRecord instance. One instance of an ActiveRecord_Validation may have validate invoked for multiple ActiveRecord instances.
Method add
Add an error message to the named attribute. Multiple error message may be associated with a single attribute. If no message is provided, the message "is invalid" is used.
Method addLimit
Append a LIMIT clause to a SQL statement
Method addLimit
Append a LIMIT clause to a SQL statement
Method addLimit
Append a LIMIT clause to a SQL statement
Method add_associate
Add an associated object to this object's collection. This method handles database updates and foreign keys. It does not directly affect the contents of an association collection object.
Method add_conditions
Add conditions fragment to a SQL statement
Method add_event_listener
Add an event listener to this class.
Method add_joins
Add join fragment to a SQL statement
Method add_limit
Add limit information to the SQL statement
Method add_method_proxy
Define a proxy for a method name.
Method add_method_proxy
Calls add_proxy_method on the object the method was originally invoked on.
Method add_on_boundary_breaking
Conditionally adds an error message to the list of supplied
Method add_on_empty
Conditionally adds an error message to the list of supplied attributes when the attribute values are empty (determined by the PHP function empty()). If no error message is provided, the message "is required" is used.
Method add_order
Add order by fragment to a SQL statement
Method add_to_base
Add an error message that pertains to the base object as opposed to a particular attribute on the object.
Method add_validation
Add a validation to the class
Method after_create
Register a method on this class to be called after a save operation is performed for a new record.
Method after_create
Check the associates to make sure they have been saved
Method after_create
Check the associate to make sure it has been saved
Method after_destroy
Register a method on this class to be called after the record is destroyed.
Method after_save
Check the associates to make sure they have been saved
Method after_save
Register a method on this class to be called after any save operation is performed.
Method after_save
Check the associate to make sure it has been saved
Method after_update
Register a method on this class to be called after a save operation is performed for a record being updated (non-new record).
Method after_validation
Register a method on this class to be called after any validation operation is performed.
Method after_validation_on_create
Register a method on this class to be called after a validation operation is performed for a new record.
Method after_validation_on_update
Register a method on this class to be called after a validation operation is performed for a record being updated (non-new record).
Method assemble_finder_options
Create an options parameter for passing to a find_* method using the output from create_finder_attribute_hash
Method associates
Returns the array of associate objects
Method attributes
Returns this object's attributes as an associative array.
Method attributes_for_set
Return the list of column names and attribute values for use in the SET clause of an UPDATE statement. The primary key column is excluded.
Method attributes_from_column_definition
Return an associative array of attributes representing the default values for the fields on this class's table. The array keys are the field names and the values are the default values.
Method attributes_protected_by_default
Return a list of attributes which are never permitted in mass-assignment. The returned list must be sorted. By default, the returned list include the primary key and inheritance column.
Method attribute_names
Returns an array of names for the attributes available on this object. The returned list is sorted alphabetically.
Method attribute_present
Returns true if the named attribute exists for this object and has a non-empty value (not null, false, 0, the empty string, or any empty array).
Method attr_accessible
Accepts the names of one or more attributes which are allowed to
Method attr_protected
Accepts the names of one or more attributes which are protected from mass assignment in this class (assignment through the constructor, create method, set_attributes method, etc.).
b
top
Variable $base
The object we belong to
Page BelongsTo.php
BelongsTo.php in BelongsTo.php
Page Base.php
Base.php in Base.php
Method base_class_name
Traverses the list of this class's parents to return the oldest ancestor which is not abstract (this is for single table inheritance since inherited classes uses the base class's table.
Method before_create
Register a method on this class to be called before a save operation is performed for a new record.
Method before_destroy
Register a method on this class to be called before the record is destroyed.
Method before_save
Register a method on this class to be called before any save operation is performed.
Method before_save
Check the associate to make sure it has been saved
Method before_update
Register a method on this class to be called before a save operation is performed for a record being updated (non-new record).
Method before_validation
Register a method on this class to be called before any validation operation is performed.
Method before_validation_on_create
Register a method on this class to be called before a validation operation is performed for a new record.
Method before_validation_on_update
Register a method on this class to be called before a validation operation is performed for a record being updated (non-new record).
Method belongs_to
Specifies a one to one association with another class where the foreign key resides in this class.
Method build
Construct a new associate from a set of attributes and add it to the collection.
Method build_associate
Build a new associated object from an associative array of attributes and assign it to the object
Method build_associate
Build a new associated object from an associative array of attributes and assign it to the object
Method build_associate
Build a new associated object from an associative array of attributes and assign it to the object. This method handles database updates and foreign keys. It does not directly affect the contents of an association collection object.
c
top
Variable $cache
Associative array containing meta information keyed by class name
Variable $cached_attributes
Variable $cached_attributes
A collection of cached attribute values
Variable $callback
Variable $caseInsenstive
Flag indicating case sensitivity
Variable $class_name
Variable $class_name
Variable $class_name
Variable $columns
Variable $columns_hash
Variable $column_names
Variable $condition
Optional condition method for determining whether or not to run
Variable $connection
Variable $connection
Variable $content_columns
Variable $count
Variable $creation_options
List of valid options for creation
Variable $creation_options
List of valid options for creation
Variable $creation_options
List of valid options for creation
Page Collection.php
Collection.php in Collection.php
Page Column.php
Column.php in Column.php
Page Connection.php
Connection.php in Connection.php
Method class_name
Return the class name for this association
Method class_name
Turn a table name back into a class name. This follows the reverse rules of the table_name method. So, for example, "my_objects" becomes "MyObject".
Method clear
Clear all errors from the collection.
Method clear
Clear all associates from the collection
Method columns
Return an array of ActiveRecord_Column objects for the table associated with this class.
Method columns
Return an array of ActiveRecordColumn objects for the named table.
Method columns
Return an array of ActiveRecord_Column objects for the named table.
Method columns
Return an array of ActiveRecord_Column objects for the named table.
Method columns_for_insert
Return the list of all attribute names prepared for use in an insert statement
Method columns_hash
Returns an associative array of column objects keyed by column name for the table associated with this class.
Method column_for_attribute
Returns the column object for the named attribute
Method column_names
Returns an array of column names as strings.
Method connect
Connect to the database
Method connection
Return the database connection for this class
Method content_columns
Returns an array of column objects suitable for direct editing
Method count
Returns the number of associated objects in the collection (same as size())
Method count
Returns a count of records matching the provided criteria.
Method count_associates
Called by the collection object to count the associated objects without loading them.
Method count_by_sql
Returns the result of an SQL statement that should only include a COUNT(*) -- or equivalent -- in the SELECT clause.
Method create
Construct a new associate and save it (validation permitting) from a set of attributes and add it to the collection.
Method create
Factory-type method for creating a new ActiveRecord_Connection (this must be used instead of constructing a new instance).
Method create
Create and save (validation permitting) an object. The newly created object is returned. If validation fails, the unsaved object is still returned.
Method create_associate
Create and save a new associated object from an associative array of attributes and assign it to the object
Method create_associate
Create and save a new associated object from an associative array of attributes and assign it to the object. This method handles database updates and foreign keys. It does not directly affect the contents of an association collection object.
Method create_associate
Create and save a new associated object from an associative array of attributes and assign it to the object
Method create_finder_attribute_hash
Extract attribute names from an "_and_" separated string and construct an associative array using a corresponding array of arguments.
Method create_or_fail
Like create, but calls save_or_fail, so if validation fails, an exception is thrown.
Method create_or_update
Handles performing the correct save operation for the object.
Method create_record
Create a new record in the database for this object
d
top
Variable $default
The default value
Page Default.php
Default.php in Default.php
Method decrement
Subtracts one from the value of the named attribute. If the attribute is null, it is first initialized to zero before subtracting one.
Method decrement_and_save
Decrements the named attribute and saves the object.
Method decrement_counter
Similar to increment_counter, but decrements the specified counter instead.
Method defaultSequenceName
Return the sequence name that would be used to generated the
Method defaultSequenceName
Return the sequence name that would be used to generated the
Method default_value
Return the default value for the column
Method delete
Deletes the record with the given id (or records with the given
Method delete
Remove the associate from the collection
Method delete_all
Destroys all records that match the given conditions. The
Method delete_cached_attribute
delete_cached_attribute removes a temporary value previously set with write_cached_attribute
Method delete_cached_attribute
Calls delete_cached_attribute on the object the method was originally invoked on.
Method destroy
Delete the record from the database
Method destroy_all
Destroys the objects for a set of records that match the given
Method do_include
Implements the 'include' behavior for a find operation
Method do_include
Implements the 'include' behavior for a find operation
Method do_include
Implements the 'include' behavior for a find operation
Method do_include
Implements the 'include' behavior for a find operation
e
top
Variable $errors
Error messages keyed by attribute
Variable $errors
Any errors that apply to this object
Variable $event_listeners
Variable $expectedArgumentCount
Page Errors.php
Errors.php in Errors.php
Method ensure_proper_type
Sets the inheritance column value for this object if needed.
Method errors
Return the errors collection for this object
Method exists
Similar to ActiveRecord_Base::exists(), but limited to items within this collection.
Method exists
Accepts an id or set of conditions and returns true if a
Method extract_limit
Retrieve the size limit from a raw SQL type
Method extract_precision
Retrieve the precision (for decimal types) from a raw SQL type
Method extract_scale
Retrieve the scale (for decimal types) from a raw SQL type
f
top
Variable $foreign_key
Variable $foreign_key
Variable $for_class
Declaring class
Method find
Find one or more records with the specified id(s). This function accepts one or more ids as it's argument. If an array is passed, it is assumed to be a list of ids.
Method find
Similar to ActiveRecord_Base::find(), but limited to items within this collection.
Method find_all
Retrieve all records matching the provided criteria.
Method find_all
Similar to ActiveRecord_Base::find_all(), but limited to items within this collection.
Method find_all
Similar to ActiveRecord_Base::find_all(), but limited to items within this collection.
Method find_by_sql
Retrieve records by a raw SQL statement instead of through the normal find helper methods.
Method find_first
Similar to ActiveRecord_Base::find_first(), but limited to items within this collection.
Method find_first
Retrieve the first record matching the provided criteria.
Method fire_event
Notifies any registered event listeners
Method foreign_key
Return the foreign key name for this association
Method full_messages
Return the collection of all full error messages.
g
top
Method get
Return the value of a property. If the value is not set on this instance, it will call get() on any parent object specified.
Method get
Return an instance of a database connection.
Method getIterator
Returns an iterator for this collections objects
Method get_associate
Accessor method for the associated object
Method get_associate
Accessor method for the associated object
Method get_associates
Accessor method for the associated objects
Method get_associate_ids
Accessor method for the associated object ids
Method get_association
Return the named association from the collection. If no such association exists on this instance, it will call get_association() on any parent object specified.
Method get_meta_info
Called internally to access the class-level meta information
Method get_meta_info
Return the class information object
Method get_new_connection
Returns a new PDO connection
h
top
Page HasMany.php
HasMany.php in HasMany.php
Page HasOne.php
HasOne.php in HasOne.php
Method has_attribute
Returns true if this object has the named attribute (even if it is empty)
Method has_cached_attribute
Calls has_cached_attribute on the object the method was originally invoked on.
Method has_cached_attribute
Returns true if this object has a cached attribute with the provided name. See write_cached_attribute for more information on cached attributes.
Method has_many
Specifies a one to many association with another class where the foreign key resides in the other class.
Method has_one
Specifies a one to one association with another class where the foreign key resides in the other class.
i
top
Variable $inheritance_column
Variable $intOnly
Flag indicating only an integer value is allowed
Page Init.php
Init.php in Init.php
Page InfoMgr.php
InfoMgr.php in InfoMgr.php
Method id
The id method/property always accesses the primary key column, even if the primary key is named something else.
Method id_before_type_cast
Access the value of the primary key column before the type cast
Method increment
Adds one to the value of the named attribute. If the attribute is null, it is first initialized to zero before adding one.
Method increment_and_save
Increments the named attribute and saves the object.
Method increment_counter
Increments the specified counter for the given id by one.
Method inheritance_column
Return the name of the column used for single table inheritance.
Method initialize
Initialize (or re-initialize) the proxy
Method init_class
Called to initialize class-specific information such as associations, validations, etc. Derived classes should implement this method to specify these class-specific details.
Method instantiate
Create a new instance of an object from a record. This handles single table inheritance, allowing different types of objects to be instantiated from the same table.
Method invoke
Invoke the proxy
Method is_empty
Test the collection to see if it is empty
Method is_empty
Returns true if the list of errors is empty
Method is_first_concrete_descendent
Determine if this class is the first concrete descendent from ActiveRecord_Base.
Method is_invalid
Returns true if the named attribute has errors
Method is_number
Return true if the data type is a numeric type
Method is_text
Return true if the data type is a text type
Method is_valid
Determine if this record is valid
l
top
Variable $limit
The size limit of the column
Variable $logger
Cached logger
Variable $longMsg
Error message to use for attributes that are too long
Variable $lowerBound
Minimum size
Method length
Returns the number of associated objects in the collection (same as size())
Method limit
Return the size limit of the column
Method load_associates
Called by the collection object to load the actual associated objects.
Method load_meta_info
This is invoked automatically by ActiveRecord_InfoMgr when the class-level meta information should be loaded.
Method logger
Return this class's logger
m
top
Variable $maximumArgumentCount
Variable $metaInf
Class meta information
Variable $metaInf
Variable $methodName
Variable $methodName
Variable $msg
Error message to use
Variable $msg
Error message to use
Variable $msg
Error message to use
Variable $msg
Variable $msg
Error message to use
Variable $msg
Error message to use
Variable $msg
Error message to use
Page Mysql.php
Mysql.php in Mysql.php
Method maximum_parameter_count
Return the maximum number of arguments accepted
Method meta_info
Retrieve the meta information for a class instance.
Method model
A convenience method that calls Support_Util::model()
n
top
Variable $name
Variable $name
Variable $name
The column name
Variable $new_record
Indicates whether this is a new record or not
Variable $null_allowed
Whether or not the column may contain nulls
Method name
Return the name of this proxy
Method name
Return the column name
Method name
Return the name of this association
Method new_record
Returns true if a corresponding record does not yet exist for this object in the database (a new object which has not yet been saved).
Method nextSequenceValue
Returns the next value from the named sequence. This function throws ActiveRecord_SequencesNotSupportedError if the connection does not support sequences.
Method nextSequenceValue
Returns the next value from the named sequence. This function throws ActiveRecord_SequencesNotSupportedError if the connection does not support sequences.
Method null_allowed
Returns true if the column may contain nulls, false otherwise.
o
top
Variable $order
Method offsetExists
Test for the existence of a given offset
Method offsetGet
Get the associate at a given offset
Method offsetSet
Set the associate at a given offset
Method offsetUnset
Unset the associate at a given offset
Method on
Return the list of errors associated with the named attribute.
Method on_base
Returns any errors associated with the base class as opposed to a sepecific attribute.
Class Constant ON_CREATE
Type for validations that run only on update
Class Constant ON_SAVE
Type for validations that always run
Class Constant ON_UPDATE
Type for validations that always run
p
top
Variable $parent
Variable $pattern
Regular expression to validate against
Variable $precision
The precision of the column
Variable $primary
A flag indicating whether or not this is the primary key for the
Variable $primary_key
Variable $primary_key
Variable $primary_key
Variable $propertyName
Variable $protected_attributes
Variable $proxied_methods
Variable $proxy
Page Provider.php
Provider.php in Provider.php
Page Proxy.php
Proxy.php in Proxy.php
Page ProxyMethod.php
ProxyMethod.php in ProxyMethod.php
Method precision
Return the precision of the column
Method prefetchPrimaryKey
Used to test whether this connection uses sequences to generate
Method prefetchPrimaryKey
Used to test whether this connection uses sequences to generate
Method primary
Returns true if this column is the tables primary key, false otherwise.
Method primary_key
Return the name of this class's primary key. Default is 'id'.
Method primary_key
Return the primary key name for this association
Method process_includes
Handle include processing for a result set
Method protected_attributes
Return a list of all attributes which have been protected from mass assignment (the list is always maintained in sorted order).
Method proxy
Return a proxy object for this class.
Method proxy_method_for
Return the proxy method for a given method name, or null if none declared.
q
top
Method quoteBoundValue
Quote a value for use by sanitizeSQL
r
top
Variable $readonly
Indicates whether this record is read-only or not
Variable $receivedArgumentCount
Variable $record
Variable $record
Variable $record
Variable $requiredArgumentCount
Method readonly
Returns the setting of the read-only flag for this object
Method read_attribute
Returns the value of an attribute type cast to the correct data type.
Method read_attribute
Calls read_attribute on the object the method was originally invoked on.
Method read_attribute_before_type_cast
Calls read_attribute_before_type_cast on the object the method was originally invoked on.
Method read_attribute_before_type_cast
Returns the value of an attribute without performing any type casting.
Method read_cached_attribute
Return the value stored in the attribute cache for the given name.
Method read_cached_attribute
Calls read_cached_attribute on the object the method was originally invoked on.
Method reload
Reloads the attributes for this object from the database.
Method remove_associate
Remove an associated object from this object's collection. This method handles database updates and foreign keys. It does not directly affect the contents of an association collection object.
Method remove_attributes_protected_from_mass_assignment
Remove attributes protected from mass assignment from an associative array
Method remove_event_listener
Remove an event listener from this class.
Method required_parameter_count
Return the number of arguments required by the method
Method reverse_type_cast
Type cast a value from PHP code into a value suitable for use in
Method reverse_type_cast
The opposite of type_cast. Accepts a data type appropriate for this column and converts it (if required) back to a value appropriate for use in a SQL statement.
Method run_validations
Evaluate all validations of a given type associated with this object
s
top
Variable $scale
The scale of the columm
Variable $scope
Scoping conditions
Variable $sequence_name
Variable $shortMsg
Error message to use for attributes that are too short
Variable $sql_type
The column data type (as reported by the DB)
Page Sqlite.php
Sqlite.php in Sqlite.php
Method sanitizeSQL
Accepts a string or array containing an SQL statement or
Method sanitizeSQL
Accepts a string or array containing an SQL statement or
Method save
Save the object to the database. If no record yet exists for the object, a new one is created. Otherwise, the existing record is updated.
Method save_or_fail
Saves the object to the database. If the save operation does not succeed, a RecordNotSaved exception is thrown.
Method scale
Return the scale of the columm
Method selectAll
Runs the select query provided in the $sql parameter, then fetches all rows into an array. Each individual row is fetched using the mode parameter provided.
Method selectValue
This is a convenience method for running select queries which
Method send_parent
Invoke a named method on an blank instance of our parent class if our parent is not abstract.
Method sequence_name
Return the name of this class's sequence. This function may be overridden by derived classes. The default name is actually determined by providing the table name and primary key name to the connection. It then builds an appropriate sequence name.
Method set_associate
Mutator method for the associated object
Method set_associate
Mutator method for the associated object
Method set_associates
Mutator method for the entire collection of associated objects
Method set_associate_ids
Mutator method for the entire collection of associated objects by ids
Method set_attributes
Allows setting of multiple attributes at once by passing an associative array. The array keys are the attribute names and the array values are the values to assign.
Method set_connection
Sets the database connection for this class
Method set_foreign_key
Mutator method for the foreign key. This is redefined to invalidate any cached object.
Method set_id
Set the value of the primary key
Method set_inheritance_column
Set the name of the column used for single table inheritance.
Method set_primary
Set whether or not this column is the tables primary key.
Method set_primary_key
Set the field name used as this class's primary key.
Method set_readonly
Change the setting of the read-only flag for this object
Method set_sequence_name
Set the name of this class's sequence.
Method set_table_name
Set the name of this class's table.
Method set_table_name_prefix
Set the prefix to add to the table name
Method set_table_name_suffix
Set the suffix to add to the table name
Method should_validate
Determine if the object should be validated or not based on the configured condition
Method simplified_type
Return a normalized type name from a raw SQL type
Method size
Returns the number of associated objects in the collection
Method size
Return the total number of errors in the collection (same as count(full_messages())).
Method sql_type
Return the column data type (as reported by the DB)
t
top
Variable $table_name
Variable $table_name_prefix
Variable $table_name_suffix
Variable $testExistence
Flag indicating type of test being performed
Variable $type
The simplified column data type
Variable $type
Validation type. One of ON_SAVE, ON_CREATE, or ON_UPDATE.
Method tables
Returns an array of table names in the database
Method tables
Returns an array of table names in the database
Method tables
Returns an array of table names in the database
Method table_exists
Determine whether the table associated with this class exists or not.
Method table_name
Return the name of this class's table. This function may be overridden by derived classes. By default it infers the name of the table by converting the mixed case name of the class to an underscore format and pluralizing the name.
Method table_name_prefix
Return any prefix to add to the table name
Method table_name_suffix
Return any suffix to add to the table name
Method toggle
Sets an attribute with a true value to false and anything else to true.
Method toggle_and_save
Toggles the named attribute and saves the object.
Method type
Return the column data type as a normalized name. May be one of integer, float, decimal, datetime, date, timestamp, time, text, string, binary, or boolean.
Method type_cast
Cast a string or raw database value to the correct type for this column
Method type_cast
Type cast a raw column value to a value suitable for use in PHP
Method type_condition
Return condition SQL fragment for single table inheritance
u
top
Variable $upperBound
Maximum size
Method update
Find an object by id and update the attributes specified in an associative array. The object is automatically saved (validation permitting) and is then returned.
Method update_all
Updates a set of records given a SQL fragment for use inside a
Method update_attribute
Updates a single attribute on this object and then saves the object.
Method update_attributes
Updates a list of attriubtes from an associative array and then saves the object.
Method update_attributes_or_fail
Operates the same as update_attributes(), but calls save_or_fail, so a RecordNotSaved exception is thrown if the save operation does not succeed.
Method update_record
Update the record associated with the object
v
top
Variable $validations
Variable $validValues
List to validate against
Page Validation.php
Validation.php in Validation.php
Method validate
Validate the object provided. If the object is invalid, it is the responsibility of this method to add any errors appropriate to the object's error collection.
Method validate
Perform validation checks applicable any time the record is saved. Use errors()->add($attribute, $message) to record any errors.
Method validate
Validate the object provided. If the object is invalid, it is the responsibility of this method to add any errors appropriate to the object's error collection.
Method validate
Validate the object provided. If the object is invalid, it is the responsibility of this method to add any errors appropriate to the object's error collection.
Method validate
Validate the object provided. If the object is invalid, it is the responsibility of this method to add any errors appropriate to the object's error collection.
Method validate
Validate the object provided. If the object is invalid, it is the responsibility of this method to add any errors appropriate to the object's error collection.
Method validate
Validate the object provided. If the object is invalid, it is the responsibility of this method to add any errors appropriate to the object's error collection.
Method validate
Validate the object provided. If the object is invalid, it is the responsibility of this method to add any errors appropriate to the object's error collection.
Method validate
Validate the object provided. If the object is invalid, it is the responsibility of this method to add any errors appropriate to the object's error collection.
Method validate
Validate the object provided. If the object is invalid, it is the responsibility of this method to add any errors appropriate to the object's error collection.
Method validates_confirmation_of
Add one or more validations for fields which have a confirmation field that must contain an identical value.
Method validates_exclusion_of
Add a validation for a field that is allowed to have any value not in a given list.
Method validates_format_of
Add a validation for the format of a field. The format is validated using a perl-compatible regular expression.
Method validates_inclusion_of
Add a validation for a field that is only allowed to have a value in a given list.
Method validates_length_of
Add one or more validations for fields lengths. Length refers to the number of characters in the field (string length).
Method validates_numericality_of
Add a validation for a field that must be numeric.
Method validates_presence_of
Add one or more validations for fields which may not be empty.
Method validates_uniqueness_of
Add one or more validations for fields which must be unique accross records.
Method validate_find_options
Validates the options provided to a find method
Method validate_on_create
Perform validation checks applicable only before saving a new record. Use errors()->add($attribute, $message) to record any errors.
Method validate_on_update
Perform validation checks applicable only before saving an existing record. Use errors()->add($attribute, $message) to record any errors.
Method validate_options
Validates a provided set of options against an allowed set
Method validation_name_to_type
Convert a string name of a validation type to the class constant
Method values_for_insert
Return the list of all attribute values prepared for use in an insert statement
w
top
Method write_attribute
Calls write_attribute on the object the method was originally invoked on.
Method write_attribute
Set the value of a named attribute. Empty strings for numeric fields are treated as NULL.
Method write_cached_attribute
Calls write_cached_attribute on the object the method was originally invoked on.
Method write_cached_attribute
write_cached_attribute allows the object to store a temporary value
a b c d e f g h i l m n o p q r s t u v w _