Back to Image class

Method getHandle

public resource
getHandle
()
Get the image resource handle
Returns
  • resource
Since
  • 3.8.0
-
  • \LogicException if an image has not been loaded into the instance
Class: Image
Project: Joomla

Method getHandle - Source code

/**
 * Get the image resource handle
 *
 * @return  resource
 *
 * @since   3.8.0
 * @throws  \LogicException if an image has not been loaded into the instance
 */
public function getHandle()
{
    // Make sure the resource handle is valid.
    if (!$this->isLoaded()) {
        throw new \LogicException('No valid image was loaded.');
    }
    return $this->handle;
}