ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PHPExcel_Worksheet_SheetView Class Reference
+ Collaboration diagram for PHPExcel_Worksheet_SheetView:

Public Member Functions

 __construct ()
 Create a new PHPExcel_Worksheet_SheetView. More...
 
 getZoomScale ()
 Get ZoomScale. More...
 
 setZoomScale ($pValue=100)
 Set ZoomScale. More...
 
 getZoomScaleNormal ()
 Get ZoomScaleNormal. More...
 
 setZoomScaleNormal ($pValue=100)
 Set ZoomScale. More...
 
 getView ()
 Get View. More...
 
 setView ($pValue=NULL)
 Set View. More...
 
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy. More...
 

Data Fields

const SHEETVIEW_NORMAL = 'normal'
 
const SHEETVIEW_PAGE_LAYOUT = 'pageLayout'
 
const SHEETVIEW_PAGE_BREAK_PREVIEW = 'pageBreakPreview'
 

Private Attributes

 $_zoomScale = 100
 
 $_zoomScaleNormal = 100
 
 $_sheetviewType = self::SHEETVIEW_NORMAL
 

Static Private Attributes

static $_sheetViewTypes
 

Detailed Description

Definition at line 36 of file SheetView.php.

Constructor & Destructor Documentation

◆ __construct()

PHPExcel_Worksheet_SheetView::__construct ( )

Create a new PHPExcel_Worksheet_SheetView.

Definition at line 80 of file SheetView.php.

81  {
82  }

Member Function Documentation

◆ __clone()

PHPExcel_Worksheet_SheetView::__clone ( )

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

Definition at line 178 of file SheetView.php.

References $key.

178  {
179  $vars = get_object_vars($this);
180  foreach ($vars as $key => $value) {
181  if (is_object($value)) {
182  $this->$key = clone $value;
183  } else {
184  $this->$key = $value;
185  }
186  }
187  }
$key
Definition: croninfo.php:18

◆ getView()

PHPExcel_Worksheet_SheetView::getView ( )

Get View.

Returns
string

Definition at line 145 of file SheetView.php.

References $_sheetviewType.

145  {
146  return $this->_sheetviewType;
147  }

◆ getZoomScale()

PHPExcel_Worksheet_SheetView::getZoomScale ( )

Get ZoomScale.

Returns
int

Definition at line 89 of file SheetView.php.

References $_zoomScale.

89  {
90  return $this->_zoomScale;
91  }

◆ getZoomScaleNormal()

PHPExcel_Worksheet_SheetView::getZoomScaleNormal ( )

Get ZoomScaleNormal.

Returns
int

Definition at line 118 of file SheetView.php.

References $_zoomScaleNormal.

118  {
120  }

◆ setView()

PHPExcel_Worksheet_SheetView::setView (   $pValue = NULL)

Set View.

Valid values are 'normal' self::SHEETVIEW_NORMAL 'pageLayout' self::SHEETVIEW_PAGE_LAYOUT 'pageBreakPreview' self::SHEETVIEW_PAGE_BREAK_PREVIEW

Parameters
string$pValue
Exceptions
PHPExcel_Exception
Returns
PHPExcel_Worksheet_SheetView

Definition at line 161 of file SheetView.php.

161  {
162  // MS Excel 2007 allows setting the view to 'normal', 'pageLayout' or 'pageBreakPreview'
163  // via the user interface
164  if ($pValue === NULL)
165  $pValue = self::SHEETVIEW_NORMAL;
166  if (in_array($pValue, self::$_sheetViewTypes)) {
167  $this->_sheetviewType = $pValue;
168  } else {
169  throw new PHPExcel_Exception("Invalid sheetview layout type.");
170  }
171 
172  return $this;
173  }

◆ setZoomScale()

PHPExcel_Worksheet_SheetView::setZoomScale (   $pValue = 100)

Set ZoomScale.

Valid values range from 10 to 400.

Parameters
int$pValue
Exceptions
PHPExcel_Exception
Returns
PHPExcel_Worksheet_SheetView

Definition at line 102 of file SheetView.php.

102  {
103  // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface,
104  // but it is apparently still able to handle any scale >= 1
105  if (($pValue >= 1) || is_null($pValue)) {
106  $this->_zoomScale = $pValue;
107  } else {
108  throw new PHPExcel_Exception("Scale must be greater than or equal to 1.");
109  }
110  return $this;
111  }

◆ setZoomScaleNormal()

PHPExcel_Worksheet_SheetView::setZoomScaleNormal (   $pValue = 100)

Set ZoomScale.

Valid values range from 10 to 400.

Parameters
int$pValue
Exceptions
PHPExcel_Exception
Returns
PHPExcel_Worksheet_SheetView

Definition at line 131 of file SheetView.php.

131  {
132  if (($pValue >= 1) || is_null($pValue)) {
133  $this->_zoomScaleNormal = $pValue;
134  } else {
135  throw new PHPExcel_Exception("Scale must be greater than or equal to 1.");
136  }
137  return $this;
138  }

Field Documentation

◆ $_sheetviewType

PHPExcel_Worksheet_SheetView::$_sheetviewType = self::SHEETVIEW_NORMAL
private

Definition at line 75 of file SheetView.php.

Referenced by getView().

◆ $_sheetViewTypes

PHPExcel_Worksheet_SheetView::$_sheetViewTypes
staticprivate
Initial value:
self::SHEETVIEW_NORMAL,
self::SHEETVIEW_PAGE_LAYOUT,
self::SHEETVIEW_PAGE_BREAK_PREVIEW,
)

Definition at line 44 of file SheetView.php.

◆ $_zoomScale

PHPExcel_Worksheet_SheetView::$_zoomScale = 100
private

Definition at line 57 of file SheetView.php.

Referenced by getZoomScale().

◆ $_zoomScaleNormal

PHPExcel_Worksheet_SheetView::$_zoomScaleNormal = 100
private

Definition at line 66 of file SheetView.php.

Referenced by getZoomScaleNormal().

◆ SHEETVIEW_NORMAL

const PHPExcel_Worksheet_SheetView::SHEETVIEW_NORMAL = 'normal'

◆ SHEETVIEW_PAGE_BREAK_PREVIEW

const PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW = 'pageBreakPreview'

◆ SHEETVIEW_PAGE_LAYOUT

const PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_LAYOUT = 'pageLayout'

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