프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$__inforecord_array | the info array | ||
$_dirty | set to true if any values here have been changed but not saved | ||
$_key_name | name of the primary key in the info record table | ||
$_key_value | value of the primary key - the master record | ||
$_loaded | set to true only when the inforecords have been loaded | ||
$_table_name | table which contains the info records | ||
$url_args |
메소드 | 설명 | |
---|---|---|
__construct ( string $table_name, string $key_name, mixed $key_value = null ) | Takes three parameters. The table of the options table, the name of the master key and the record_id for which options are managed. | |
__get ( string $name ) : mixed | Fetch info record value. | |
__isset ( string $name ) : boolean | Test for the existence of specified info value | |
__set ( string $name, mixed $value ) | Update the info record. | |
__unset ( string $name ) : boolean | Remove an info option; immediately unsets from the storage AND removes from database. Use with caution. | |
commit ( mixed $metadata_key = null ) : boolean | Commit all of the changed info options to the database. | |
count ( ) : integer | Get the number of info records | |
delete_all ( ) : boolean | Remove all info options. Primarily used when deleting the parent object. | |
getArrayCopy ( ) | ||
get_url_args ( ) : array | Returns a set of properties used by URL::get to create URLs | |
is_key_set ( ) : boolean | Test if the master record value has been set (and thus, safe to set info records). | |
set_key ( mixed $metadata_key ) | function set_key For use in cases where the master record key is not known at the time of object instantiation (ie: a new post) |
메소드 | 설명 | |
---|---|---|
_load ( ) | Populate the internal hashmap with the values from the DB. |
public __construct ( string $table_name, string $key_name, mixed $key_value = null ) | ||
$table_name | string | name of the table to insert info (use the DB::o()->table_name syntax) |
$key_name | string | name of the primary key (for example "post_id") |
$key_value | mixed | (optional) the master record key value (for example, info for post_id = 1 managed by setting this param to 1). Use set_key method if not set here. |
public delete_all ( ) : boolean | ||
리턴 | boolean | true if the options were successfully unset, false otherwise |
public get_url_args ( ) : array | ||
리턴 | array | Properties of this post used to build a URL |
public is_key_set ( ) : boolean | ||
리턴 | boolean | true if master record value has been set already, false otherwise |
protected $_dirty |