You are here

protected function Textimage::set in Textimage 7.3

Set a property to a specified value.

A Textimage already processed will not allow changes.

Parameters

string $property: the property to set

mixed $value: the value to set

Return value

self this object

10 calls to Textimage::set()
Textimage::effects in classes/Textimage.inc
Set the image effects.
Textimage::extension in classes/Textimage.inc
Set the image file extension.
Textimage::node in classes/Textimage.inc
Set a node entity to resolve node tokens.
Textimage::setCaching in classes/Textimage.inc
Set caching.
Textimage::setHashedFilename in classes/Textimage.inc
Force hashed filename.

... See full list

File

classes/Textimage.inc, line 134
Textimage - Textimage class.

Class

Textimage
@file Textimage - Textimage class.

Code

protected function set($property, $value) {
  if (!property_exists($this, $property)) {
    throw new TextimageException(t("Attempted to set non existing property '@property'.", array(
      '@property' => $property,
    )));
  }
  if (!$this->processed) {
    $this->{$property} = $value;
  }
  else {
    throw new TextimageException(t("Attempted to set property '@property' when image was processed already.", array(
      '@property' => $property,
    )));
  }
  return $this;
}