PersistentObject PersistentObject(
$tablename,
$unique_set, [
$cache_by = NULL], [
$use_cache = true], [
$is_transient = false], [
$allowCreate = true]
)
|
|
Parameters:
|
$tablename: |
|
|
$unique_set: |
|
|
$cache_by: |
|
|
$use_cache: |
|
|
$is_transient: |
|
|
$allowCreate: |
|
API Tags:
void copy(
$new_unique_set
)
|
|
Copy this record to another unique set. Checks if the record exists there first, if so returns false. If successful returns true. No changes are made to this object and no other objects are created, just the database entry.
A call to copy is instant, it does not require a save() following it.
Parameters:
Redefined in descendants as:
-
AlbumBase::copy()
: Copy this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.
-
Album::copy()
: Copy this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.
-
dynamicAlbum::copy()
: Copy this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.
-
Image::copy()
: Copies the image to a new album, along with all metadata.
-
ZenpageNews::copy()
: duplicates an article
-
ZenpagePage::copy()
: duplicates an article
void get(
$var, [
$current = true]
)
|
|
Get the value of a variable. If $current is false, return the value as of the last save of this object.
Parameters:
returns the database record of the object
Returns the id
Redefined in descendants as:
bool instantiate(
$tablename
$tablename, $unique_set
$unique_set, [$cache_by
$cache_by = NULL], [$use_cache
$use_cache = true], [$is_transient
$is_transient = false], [$allowCreate
$allowCreate = true]
)
|
|
Prime instantiator for Zenphoto objects
Parameters:
$tablename |
$tablename: |
The name of the database table |
$unique_set |
$unique_set: |
An array of unique fields |
$cache_by |
$cache_by: |
|
$use_cache |
$use_cache: |
|
$is_transient |
$is_transient: |
Set true to prevent database insertion |
$allowCreate |
$allowCreate: |
Set true to allow a new object to be made. |
API Tags:
Return: | will be true if the unique_set does not already exist |
void move(
$new_unique_set
)
|
|
Change one or more values of the unique set assigned to this record.
Checks if the record already exists first, if so returns false. If successful returns true and changes $this->unique_set A call to move is instant, it does not require a save() following it.
Parameters:
Redefined in descendants as:
-
AlbumBase::move()
: Move this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.
-
Album::move()
: Move this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.
-
dynamicAlbum::move()
: Move this album to the location specified by $newfolder, copying all metadata, subalbums, and subalbums' metadata with it.
-
Image::move()
: Moves an image to a new album and/or filename (rename).
Deletes object from the database
Redefined in descendants as:
Save the updates made to this object since the last update. Returns true if successful, false if not.
Redefined in descendants as:
Set a variable in this object. Does not persist to the database until save() is called. So, IMPORTANT: Call save() after set() to persist.
If the requested variable is not in the database, sets it in temp storage, which won't be persisted to the database.
Parameters:
Sets default values for new objects using the set() method.
Should do nothing in the base class; subclasses should override.
API Tags:
Redefined in descendants as:
"Magic" function to return a string identifying the object when it is treated as a string
API Tags: