Overview

Packages

  • admin
  • classes
    • media
  • CodeIgniter
    • Libraries
  • core
  • functions
  • JSMin
  • None
  • OpenID
  • PHP
  • PHPMailer
  • plugins
    • admin
    • development
    • feed
    • mail
    • media
    • misc
    • seo
    • spam
    • uploader
    • users
    • zenpage
    • zenphoto
      • news
  • Services
    • JSON

Classes

  • Album
  • AlbumBase
  • Comment
  • dynamicAlbum
  • feed
  • Gallery
  • Image
  • MediaObject
  • PersistentObject
  • SearchEngine
  • ThemeObject
  • Transientimage
  • Zenphoto_Administrator
  • Zenphoto_Authority

Functions

  • isAlbumClass
  • isImageClass
  • newAlbum
  • newImage
  • search_quote
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class PersistentObject

Direct known subclasses

Comment, ThemeObject, Zenphoto_Administrator

Indirect known subclasses

Album, AlbumBase, WEBdocs, ZenpageCategory, ZenpageItems, ZenpageNews, ZenpagePage, ZenpageRoot, AnyFile, dynamicAlbum, favorites, Image, MediaObject, TextObject, Transientimage, Video
Package: classes
Located at classes.php
Methods summary
public
# __construct( $tablename, $unique_set, $cache_by = NULL, $use_cache = true, $is_transient = false, $allowCreate = true )

Deprecated

public boolean
# instantiate( $tablename, $unique_set, $cache_by = NULL, $use_cache = true, $is_transient = false, $allowCreate = true )

}

}

Prime instantiator for Zenphoto objects

Parameters

$tablename
name of the database table
$unique_set
array of unique fields
$cache_by
$use_cache
$is_transient
true to prevent database insertion
$allowCreate
true to allow a new object to be made.

Returns

boolean
will be true if the unique_set does not already exist
public
# set( $var, $value )

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.

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.

protected
# setDefaults( )

Sets default values for new objects using the set() method. Should do nothing in the base class; subclasses should override.

Sets default values for new objects using the set() method. Should do nothing in the base class; subclasses should override.

public
# 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.

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.

public
# 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.

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.

public boolean
# remove( )

Deletes object from the database

Deletes object from the database

Returns

boolean
public string
# getID( )

Returns the id

Returns the id

Returns

string
public array
# getData( )

returns the database record of the object

Returns

array
public
# 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.

Get the value of a variable. If $current is false, return the value as of the last save of this object.

public
# save( )

Save the updates made to this object since the last update. Returns true if successful, false if not.

Save the updates made to this object since the last update. Returns true if successful, false if not.

public string
# __toString( )

"Magic" function to return a string identifying the object when it is treated as a string

Returns

string
Properties summary
public boolean $loaded
# false
public boolean $exists
# false
public $table
#
public $transient
#
protected integer $id
# 0
Zenphoto doc API documentation generated by ApiGen