ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
PHPExcel_Worksheet_HeaderFooter Class Reference
+ Collaboration diagram for PHPExcel_Worksheet_HeaderFooter:

Public Member Functions

 __construct ()
 Create a new PHPExcel_Worksheet_HeaderFooter.
 getOddHeader ()
 Get OddHeader.
 setOddHeader ($pValue)
 Set OddHeader.
 getOddFooter ()
 Get OddFooter.
 setOddFooter ($pValue)
 Set OddFooter.
 getEvenHeader ()
 Get EvenHeader.
 setEvenHeader ($pValue)
 Set EvenHeader.
 getEvenFooter ()
 Get EvenFooter.
 setEvenFooter ($pValue)
 Set EvenFooter.
 getFirstHeader ()
 Get FirstHeader.
 setFirstHeader ($pValue)
 Set FirstHeader.
 getFirstFooter ()
 Get FirstFooter.
 setFirstFooter ($pValue)
 Set FirstFooter.
 getDifferentOddEven ()
 Get DifferentOddEven.
 setDifferentOddEven ($pValue=false)
 Set DifferentOddEven.
 getDifferentFirst ()
 Get DifferentFirst.
 setDifferentFirst ($pValue=false)
 Set DifferentFirst.
 getScaleWithDocument ()
 Get ScaleWithDocument.
 setScaleWithDocument ($pValue=true)
 Set ScaleWithDocument.
 getAlignWithMargins ()
 Get AlignWithMargins.
 setAlignWithMargins ($pValue=true)
 Set AlignWithMargins.
 addImage (PHPExcel_Worksheet_HeaderFooterDrawing $image=null, $location=self::IMAGE_HEADER_LEFT)
 Add header/footer image.
 removeImage ($location=self::IMAGE_HEADER_LEFT)
 Remove header/footer image.
 setImages ($images)
 Set header/footer images.
 getImages ()
 Get header/footer images.
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy.

Data Fields

const IMAGE_HEADER_LEFT = 'LH'
const IMAGE_HEADER_CENTER = 'CH'
const IMAGE_HEADER_RIGHT = 'RH'
const IMAGE_FOOTER_LEFT = 'LF'
const IMAGE_FOOTER_CENTER = 'CF'
const IMAGE_FOOTER_RIGHT = 'RF'

Private Attributes

 $_oddHeader
 $_oddFooter
 $_evenHeader
 $_evenFooter
 $_firstHeader
 $_firstFooter
 $_differentOddEven
 $_differentFirst
 $_scaleWithDocument
 $_alignWithMargins
 $_headerFooterImages = array()

Detailed Description

Definition at line 108 of file HeaderFooter.php.

Constructor & Destructor Documentation

PHPExcel_Worksheet_HeaderFooter::__construct ( )

Create a new PHPExcel_Worksheet_HeaderFooter.

Definition at line 198 of file HeaderFooter.php.

{
// Initialise values
$this->_oddHeader = '';
$this->_oddFooter = '';
$this->_evenHeader = '';
$this->_evenFooter = '';
$this->_firstHeader = '';
$this->_firstFooter = '';
$this->_differentOddEven = false;
$this->_differentFirst = false;
$this->_scaleWithDocument = true;
$this->_alignWithMargins = true;
$this->_headerFooterImages = array();
}

Member Function Documentation

PHPExcel_Worksheet_HeaderFooter::__clone ( )

Implement PHP __clone to create a deep clone, not just a shallow copy.

Definition at line 479 of file HeaderFooter.php.

References $key.

{
$vars = get_object_vars($this);
foreach ($vars as $key => $value) {
if (is_object($value)) {
$this->$key = clone $value;
} else {
$this->$key = $value;
}
}
}
PHPExcel_Worksheet_HeaderFooter::addImage ( PHPExcel_Worksheet_HeaderFooterDrawing  $image = null,
  $location = self::IMAGE_HEADER_LEFT 
)

Add header/footer image.

Parameters
PHPExcel_Worksheet_HeaderFooterDrawing$image
string$location
Exceptions
Exception
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 422 of file HeaderFooter.php.

References $location.

{
$this->_headerFooterImages[$location] = $image;
return $this;
}
PHPExcel_Worksheet_HeaderFooter::getAlignWithMargins ( )

Get AlignWithMargins.

Returns
boolean

Definition at line 399 of file HeaderFooter.php.

References $_alignWithMargins.

PHPExcel_Worksheet_HeaderFooter::getDifferentFirst ( )

Get DifferentFirst.

Returns
boolean

Definition at line 359 of file HeaderFooter.php.

References $_differentFirst.

PHPExcel_Worksheet_HeaderFooter::getDifferentOddEven ( )

Get DifferentOddEven.

Returns
boolean

Definition at line 339 of file HeaderFooter.php.

References $_differentOddEven.

PHPExcel_Worksheet_HeaderFooter::getEvenFooter ( )

Get EvenFooter.

Returns
string

Definition at line 279 of file HeaderFooter.php.

References $_evenFooter.

{
}
PHPExcel_Worksheet_HeaderFooter::getEvenHeader ( )

Get EvenHeader.

Returns
string

Definition at line 259 of file HeaderFooter.php.

References $_evenHeader.

{
}
PHPExcel_Worksheet_HeaderFooter::getFirstFooter ( )

Get FirstFooter.

Returns
string

Definition at line 319 of file HeaderFooter.php.

References $_firstFooter.

{
}
PHPExcel_Worksheet_HeaderFooter::getFirstHeader ( )

Get FirstHeader.

Returns
string

Definition at line 299 of file HeaderFooter.php.

References $_firstHeader.

{
}
PHPExcel_Worksheet_HeaderFooter::getImages ( )

Get header/footer images.

Returns
HPExcel_Worksheet_HeaderFooterDrawing[]

Definition at line 462 of file HeaderFooter.php.

References $_headerFooterImages, IMAGE_FOOTER_CENTER, IMAGE_FOOTER_LEFT, IMAGE_FOOTER_RIGHT, IMAGE_HEADER_CENTER, IMAGE_HEADER_LEFT, and IMAGE_HEADER_RIGHT.

{
// Sort array
$images = array();
if (isset($this->_headerFooterImages[self::IMAGE_HEADER_LEFT])) $images[self::IMAGE_HEADER_LEFT] = $this->_headerFooterImages[self::IMAGE_HEADER_LEFT];
if (isset($this->_headerFooterImages[self::IMAGE_HEADER_CENTER])) $images[self::IMAGE_HEADER_CENTER] = $this->_headerFooterImages[self::IMAGE_HEADER_CENTER];
if (isset($this->_headerFooterImages[self::IMAGE_HEADER_RIGHT])) $images[self::IMAGE_HEADER_RIGHT] = $this->_headerFooterImages[self::IMAGE_HEADER_RIGHT];
if (isset($this->_headerFooterImages[self::IMAGE_FOOTER_LEFT])) $images[self::IMAGE_FOOTER_LEFT] = $this->_headerFooterImages[self::IMAGE_FOOTER_LEFT];
if (isset($this->_headerFooterImages[self::IMAGE_FOOTER_CENTER])) $images[self::IMAGE_FOOTER_CENTER] = $this->_headerFooterImages[self::IMAGE_FOOTER_CENTER];
if (isset($this->_headerFooterImages[self::IMAGE_FOOTER_RIGHT])) $images[self::IMAGE_FOOTER_RIGHT] = $this->_headerFooterImages[self::IMAGE_FOOTER_RIGHT];
$this->_headerFooterImages = $images;
}
PHPExcel_Worksheet_HeaderFooter::getOddFooter ( )

Get OddFooter.

Returns
string

Definition at line 239 of file HeaderFooter.php.

References $_oddFooter.

{
}
PHPExcel_Worksheet_HeaderFooter::getOddHeader ( )

Get OddHeader.

Returns
string

Definition at line 219 of file HeaderFooter.php.

References $_oddHeader.

{
}
PHPExcel_Worksheet_HeaderFooter::getScaleWithDocument ( )

Get ScaleWithDocument.

Returns
boolean

Definition at line 379 of file HeaderFooter.php.

References $_scaleWithDocument.

PHPExcel_Worksheet_HeaderFooter::removeImage (   $location = self::IMAGE_HEADER_LEFT)

Remove header/footer image.

Parameters
string$location
Exceptions
Exception
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 434 of file HeaderFooter.php.

References $location.

{
if (isset($this->_headerFooterImages[$location])) {
unset($this->_headerFooterImages[$location]);
}
return $this;
}
PHPExcel_Worksheet_HeaderFooter::setAlignWithMargins (   $pValue = true)

Set AlignWithMargins.

Parameters
boolean$pValue
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 409 of file HeaderFooter.php.

{
$this->_alignWithMargins = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooter::setDifferentFirst (   $pValue = false)

Set DifferentFirst.

Parameters
boolean$pValue
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 369 of file HeaderFooter.php.

{
$this->_differentFirst = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooter::setDifferentOddEven (   $pValue = false)

Set DifferentOddEven.

Parameters
boolean$pValue
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 349 of file HeaderFooter.php.

{
$this->_differentOddEven = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooter::setEvenFooter (   $pValue)

Set EvenFooter.

Parameters
string$pValue
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 289 of file HeaderFooter.php.

{
$this->_evenFooter = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooter::setEvenHeader (   $pValue)

Set EvenHeader.

Parameters
string$pValue
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 269 of file HeaderFooter.php.

{
$this->_evenHeader = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooter::setFirstFooter (   $pValue)

Set FirstFooter.

Parameters
string$pValue
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 329 of file HeaderFooter.php.

{
$this->_firstFooter = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooter::setFirstHeader (   $pValue)

Set FirstHeader.

Parameters
string$pValue
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 309 of file HeaderFooter.php.

{
$this->_firstHeader = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooter::setImages (   $images)

Set header/footer images.

Parameters
PHPExcel_Worksheet_HeaderFooterDrawing[]$images
Exceptions
Exception
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 448 of file HeaderFooter.php.

{
if (!is_array($images)) {
throw new Exception('Invalid parameter!');
}
$this->_headerFooterImages = $images;
return $this;
}
PHPExcel_Worksheet_HeaderFooter::setOddFooter (   $pValue)

Set OddFooter.

Parameters
string$pValue
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 249 of file HeaderFooter.php.

{
$this->_oddFooter = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooter::setOddHeader (   $pValue)

Set OddHeader.

Parameters
string$pValue
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 229 of file HeaderFooter.php.

{
$this->_oddHeader = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooter::setScaleWithDocument (   $pValue = true)

Set ScaleWithDocument.

Parameters
boolean$pValue
Returns
PHPExcel_Worksheet_HeaderFooter

Definition at line 389 of file HeaderFooter.php.

{
$this->_scaleWithDocument = $pValue;
return $this;
}

Field Documentation

PHPExcel_Worksheet_HeaderFooter::$_alignWithMargins
private

Definition at line 186 of file HeaderFooter.php.

Referenced by getAlignWithMargins().

PHPExcel_Worksheet_HeaderFooter::$_differentFirst
private

Definition at line 172 of file HeaderFooter.php.

Referenced by getDifferentFirst().

PHPExcel_Worksheet_HeaderFooter::$_differentOddEven
private

Definition at line 165 of file HeaderFooter.php.

Referenced by getDifferentOddEven().

PHPExcel_Worksheet_HeaderFooter::$_evenFooter
private

Definition at line 144 of file HeaderFooter.php.

Referenced by getEvenFooter().

PHPExcel_Worksheet_HeaderFooter::$_evenHeader
private

Definition at line 137 of file HeaderFooter.php.

Referenced by getEvenHeader().

PHPExcel_Worksheet_HeaderFooter::$_firstFooter
private

Definition at line 158 of file HeaderFooter.php.

Referenced by getFirstFooter().

PHPExcel_Worksheet_HeaderFooter::$_firstHeader
private

Definition at line 151 of file HeaderFooter.php.

Referenced by getFirstHeader().

PHPExcel_Worksheet_HeaderFooter::$_headerFooterImages = array()
private

Definition at line 193 of file HeaderFooter.php.

Referenced by getImages().

PHPExcel_Worksheet_HeaderFooter::$_oddFooter
private

Definition at line 130 of file HeaderFooter.php.

Referenced by getOddFooter().

PHPExcel_Worksheet_HeaderFooter::$_oddHeader
private

Definition at line 123 of file HeaderFooter.php.

Referenced by getOddHeader().

PHPExcel_Worksheet_HeaderFooter::$_scaleWithDocument
private

Definition at line 179 of file HeaderFooter.php.

Referenced by getScaleWithDocument().

const PHPExcel_Worksheet_HeaderFooter::IMAGE_FOOTER_CENTER = 'CF'

Definition at line 115 of file HeaderFooter.php.

Referenced by getImages().

const PHPExcel_Worksheet_HeaderFooter::IMAGE_FOOTER_LEFT = 'LF'

Definition at line 114 of file HeaderFooter.php.

Referenced by getImages().

const PHPExcel_Worksheet_HeaderFooter::IMAGE_FOOTER_RIGHT = 'RF'

Definition at line 116 of file HeaderFooter.php.

Referenced by getImages().

const PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_CENTER = 'CH'

Definition at line 112 of file HeaderFooter.php.

Referenced by getImages().

const PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_LEFT = 'LH'

Definition at line 111 of file HeaderFooter.php.

Referenced by getImages().

const PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_RIGHT = 'RH'

Definition at line 113 of file HeaderFooter.php.

Referenced by getImages().


The documentation for this class was generated from the following file: