{
public
function
getWidth();
public
function
getHeight();
public
function
getPath();
/**
* @return string the image's byte stream
*/
public
function
dump();
}
/**
* Abstract class to avoid repetition of boilerplate code in the Proxy
* and in the Subject. Only the methods which can be provided without
* instancing the RealSubject are present here.
*/
abstract
class
AbstractImage
implements
Image
{
protected
$_width
;
protected
$_height
;
protected
$_path
;
protected
$_data
;
public
function
getWidth()
{
return
$this
->_width;
}
public
function
getHeight()
{
return
$this
->_height;
}
public
function
getPath()
{
return
$this
->_path;
}