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 Image

handles 'picture' images

PersistentObject
Extended by ThemeObject
Extended by MediaObject
Extended by Image

Direct known subclasses

TextObject, Transientimage, Video

Indirect known subclasses

AnyFile, WEBdocs
Package: classes
Located at class-image.php
Methods summary
public Image
# __construct( object $album, sting $filename, $quiet = false )

Constructor for class-image

Constructor for class-image

Do not call this constructor directly unless you really know what you are doing! Use instead the function newImage() which will instantiate an object of the correct class for the file type.

Parameters

$album
$album the owning album
$filename
the filename of the image
$quiet

Returns

Image

Overrides

MediaObject::__construct()
protected
# setDefaults( )

(non-PHPdoc)

(non-PHPdoc)

See

PersistentObject::setDefaults()

Overrides

PersistentObject::setDefaults()
protected boolean
# classSetup( object & $album, string $filename )

generic "image" class setup code Returns true if valid image.

generic "image" class setup code Returns true if valid image.

Parameters

$album
the images' album
$filename
of the image

Returns

boolean
public string
# getFileName( )

Returns the image filename

Returns the image filename

Returns

string
protected boolean
# fileChanged( )

Returns true if the file has changed since last time we looked

Returns true if the file has changed since last time we looked

Returns

boolean
public array
# getMetaData( )

Returns an array of EXIF data

Returns an array of EXIF data

Returns

array
public
# updateMetaData( )

Parses Exif/IPTC data

Parses Exif/IPTC data

public
# updateDimensions( )

Update this object's values for width and height.

Update this object's values for width and height.

public integer
# getWidth( )

Returns the width of the image

Returns the width of the image

Returns

integer
public integer
# getHeight( )

Returns the height of the image

Returns the height of the image

Returns

integer
public object
# getAlbum( )

Returns the album that holds this image

Returns the album that holds this image

Returns

object
public string
# getAlbumName( )

Retuns the folder name of the album that holds this image

Retuns the folder name of the album that holds this image

Returns

string
public string
# getLocation( $locale = NULL )

Returns the location field of the image

Returns the location field of the image

Returns

string
public
# setLocation( string $location )

Stores the location field of the image

Stores the location field of the image

Parameters

$location
text for the location
public string
# getCity( $locale = NULL )

Returns the city field of the image

Returns the city field of the image

Returns

string
public
# setCity( string $city )

Stores the city field of the image

Stores the city field of the image

Parameters

$city
text for the city
public string
# getState( $locale = NULL )

Returns the state field of the image

Returns the state field of the image

Returns

string
public
# setState( string $state )

Stores the state field of the image

Stores the state field of the image

Parameters

$state
text for the state
public string
# getCountry( $locale = NULL )

Returns the country field of the image

Returns the country field of the image

Returns

string
public
# setCountry( string $country )

Stores the country field of the image

Stores the country field of the image

Parameters

$country
text for the country filed
public string
# getCredit( $locale = NULL )

Returns the credit field of the image

Returns the credit field of the image

Returns

string
public
# setCredit( string $credit )

Stores the credit field of the image

Stores the credit field of the image

Parameters

$credit
text for the credit field
public string
# getCopyright( $locale = NULL )

Returns the copyright field of the image

Returns the copyright field of the image

Returns

string
public
# setCopyright( string $copyright )

Stores the text for the copyright field of the image

Stores the text for the copyright field of the image

Parameters

$copyright
text for the copyright field
public boolean
# remove( boolean $clean,… )

Permanently delete this image (permanent: be careful!) Returns the result of the unlink operation (whether the delete was successful)

Permanently delete this image (permanent: be careful!) Returns the result of the unlink operation (whether the delete was successful)

Parameters

$clean,…
whether to remove the database entry.

Returns

boolean

Overrides

PersistentObject::remove()
public integer
# move( Album $newalbum, string $newfilename = null )

Moves an image to a new album and/or filename (rename). Returns 0 on success and error indicator on failure.

Moves an image to a new album and/or filename (rename). Returns 0 on success and error indicator on failure.

Parameters

$newalbum
the album to move this file to. Must be a valid Album object.
$newfilename
the new file name of the image in the specified album.

Returns

integer

Overrides

PersistentObject::move()
public boolean
# rename( string $newfilename )

Renames an image to a new filename, keeping it in the same album. Convenience for move($image->album, $newfilename). Returns true on success and false on failure.

Renames an image to a new filename, keeping it in the same album. Convenience for move($image->album, $newfilename). Returns true on success and false on failure.

Parameters

$newfilename
the new file name of the image file.

Returns

boolean
public
# copy( string $newalbum )

Copies the image to a new album, along with all metadata.

Copies the image to a new album, along with all metadata.

Parameters

$newalbum
the destination album

Overrides

PersistentObject::copy()
public string
# getLink( )

Returns a path urlencoded image page link for the image

Returns a path urlencoded image page link for the image

Returns

string
public string
# getImageLink( )

Returns a path urlencoded image page link for the image

Returns a path urlencoded image page link for the image

Deprecated

since version 1.4.6

Returns

string
public string
# getFullImage( string $path = WEBPATH )

Returns a path to the original image in the original folder.

Returns a path to the original image in the original folder.

Parameters

$path
the "path" to the image. Defaults to the simple WEBPATH

Returns

string
public
# getFullImageURL( )

returns URL to the original image

returns URL to the original image

public string
# getSizedImage( integer $size )

Returns a path to a sized version of the image

Returns a path to a sized version of the image

Parameters

$size
how big an image is wanted

Returns

string
public string
# getCustomImage( integer $size, integer $width, integer $height, integer $cropw, integer $croph, integer $cropx, integer $cropy, boolean $thumbStandin = false, boolean $effects = NULL )

Get a custom sized version of this image based on the parameters.

Get a custom sized version of this image based on the parameters.

Parameters

$size
size
$width
width
$height
height
$cropw
crop width
$croph
crop height
$cropx
crop x axis
$cropy
crop y axis
$thumbStandin
set to true to treat as thumbnail
$effects
set to desired image effect (e.g. 'gray' to force gray scale)

Returns

string
public string
# getContent( )

Returns the default sized image HTML

Returns the default sized image HTML

Returns

string
public s
# getThumbImageFile( string $path,… )

Returns the image file name for the thumbnail image.

Returns the image file name for the thumbnail image.

Parameters

$path,…
override path

Returns

s
public
# getThumbCropping( string $ts, $sw, $sh )

Returns an array of cropping parameters. Used as a "helper" function for various inherited getThumb() methods

Returns an array of cropping parameters. Used as a "helper" function for various inherited getThumb() methods

Parameters

$ts
$type the type of thumb (in case it ever matters in the cropping, now it does not.)
$sw
$sh
public string
# getThumb( $type = 'image' )

Get a default-sized thumbnail of this image.

Get a default-sized thumbnail of this image.

Returns

string
public integer
# getIndex( )

Get the index of this image in the album, taking sorting into account.

Get the index of this image in the album, taking sorting into account.

Returns

integer
public object
# getNextImage( )

Returns the next Image.

Returns the next Image.

Returns

object
public object
# getPrevImage( )

Return the previous Image

Return the previous Image

Returns

object
public string
# getImageFootprint( )

Returns the disk size of the image

Returns the disk size of the image

Returns

string
public string
# getWatermark( )

Returns the custom watermark name

Returns the custom watermark name

Returns

string
public
# setWatermark( string $wm )

Set custom watermark

Set custom watermark

Parameters

$wm
public boolean
# getWMUse( )

Returns the custom watermark usage

Returns the custom watermark usage

Returns

boolean
public
# setWMUse( $use )

Sets the custom watermark usage

Sets the custom watermark usage

Parameters

$use
public
# getOwner( )

Owner functions

Owner functions

public
# setOwner( $owner )
public
# isMyItem( bit $action )

Checks basic access rights of an object

Checks basic access rights of an object

Parameters

$action
what the caller wants to do

Overrides

ThemeObject::isMyItem()
public
# checkAccess( string & $hint = NULL, string & $show = NULL )

returns true if user is allowed to see the image

returns true if user is allowed to see the image

Parameters

$hint
$show

Overrides

ThemeObject::checkAccess()
public
# checkforGuest( unknown_type & $hint = NULL, unknown_type & $show = NULL )

Checks if guest is loggedin for the album

Checks if guest is loggedin for the album

Parameters

$hint
$show
public
# isProtected( )

returns true if there is any protection on the image

Methods inherited from MediaObject
getDesc(), getExpireDate(), getPassword(), getPasswordHint(), getPublishDate(), getSortOrder(), getUser(), setDesc(), setExpireDate(), setPassword(), setPasswordHint(), setPublishDate(), setSortOrder(), setUser()
Methods inherited from ThemeObject
addComment(), checkForGuest(), checkPublishDates(), countHit(), getCodeblock(), getCommentCount(), getComments(), getCommentsAllowed(), getCustomData(), getDateTime(), getHitcounter(), getParentID(), getShow(), getTags(), getTitle(), hasTag(), setCodeblock(), setCommentsAllowed(), setCustomData(), setDateTime(), setParentID(), setShow(), setTags(), setTitle()
Methods inherited from PersistentObject
__toString(), get(), getData(), getID(), instantiate(), save(), set()
Properties summary
public $filename
#
public boolean $exists
# true
public $webpath
#
public $localpath
#
public $displayname
#
public $album
#
public $albumname
#
public $albumnamealbum
#
public $albumlink
#
public $imagefolder
#
protected $index
#
protected $sortorder
#
public $filemtime
#
public array $sidecars
# array()
public $manage_rights
# MANAGE_ALL_ALBUM_RIGHTS
public $manage_some_rights
# ALBUM_RIGHTS
public $view_rights
# ALL_ALBUMS_RIGHTS
public $objectsThumb
# NULL
Properties inherited from ThemeObject
$comments
Properties inherited from PersistentObject
$id, $loaded, $table, $transient
Zenphoto doc API documentation generated by ApiGen