More efforts to get codebase to conform with PSR-2 coding standards

This commit is contained in:
MarkBaker 2015-05-11 22:38:52 +01:00
parent 547d2bd3b2
commit c70e289dac
59 changed files with 29020 additions and 29108 deletions

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Chart
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Chart
*
* @category PHPExcel
* @package PHPExcel_Chart
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Chart class PHPExcel_Chart
{ {
/** /**
@ -198,7 +190,8 @@ class PHPExcel_Chart
* *
* @return string * @return string
*/ */
public function getName() { public function getName()
{
return $this->_name; return $this->_name;
} }
@ -207,7 +200,8 @@ class PHPExcel_Chart
* *
* @return PHPExcel_Worksheet * @return PHPExcel_Worksheet
*/ */
public function getWorksheet() { public function getWorksheet()
{
return $this->_worksheet; return $this->_worksheet;
} }
@ -218,7 +212,8 @@ class PHPExcel_Chart
* @throws PHPExcel_Chart_Exception * @throws PHPExcel_Chart_Exception
* @return PHPExcel_Chart * @return PHPExcel_Chart
*/ */
public function setWorksheet(PHPExcel_Worksheet $pValue = null) { public function setWorksheet(PHPExcel_Worksheet $pValue = null)
{
$this->_worksheet = $pValue; $this->_worksheet = $pValue;
return $this; return $this;
@ -229,7 +224,8 @@ class PHPExcel_Chart
* *
* @return PHPExcel_Chart_Title * @return PHPExcel_Chart_Title
*/ */
public function getTitle() { public function getTitle()
{
return $this->_title; return $this->_title;
} }
@ -239,7 +235,8 @@ class PHPExcel_Chart
* @param PHPExcel_Chart_Title $title * @param PHPExcel_Chart_Title $title
* @return PHPExcel_Chart * @return PHPExcel_Chart
*/ */
public function setTitle(PHPExcel_Chart_Title $title) { public function setTitle(PHPExcel_Chart_Title $title)
{
$this->_title = $title; $this->_title = $title;
return $this; return $this;
@ -250,7 +247,8 @@ class PHPExcel_Chart
* *
* @return PHPExcel_Chart_Legend * @return PHPExcel_Chart_Legend
*/ */
public function getLegend() { public function getLegend()
{
return $this->_legend; return $this->_legend;
} }
@ -260,7 +258,8 @@ class PHPExcel_Chart
* @param PHPExcel_Chart_Legend $legend * @param PHPExcel_Chart_Legend $legend
* @return PHPExcel_Chart * @return PHPExcel_Chart
*/ */
public function setLegend(PHPExcel_Chart_Legend $legend) { public function setLegend(PHPExcel_Chart_Legend $legend)
{
$this->_legend = $legend; $this->_legend = $legend;
return $this; return $this;
@ -271,7 +270,8 @@ class PHPExcel_Chart
* *
* @return PHPExcel_Chart_Title * @return PHPExcel_Chart_Title
*/ */
public function getXAxisLabel() { public function getXAxisLabel()
{
return $this->_xAxisLabel; return $this->_xAxisLabel;
} }
@ -281,7 +281,8 @@ class PHPExcel_Chart
* @param PHPExcel_Chart_Title $label * @param PHPExcel_Chart_Title $label
* @return PHPExcel_Chart * @return PHPExcel_Chart
*/ */
public function setXAxisLabel(PHPExcel_Chart_Title $label) { public function setXAxisLabel(PHPExcel_Chart_Title $label)
{
$this->_xAxisLabel = $label; $this->_xAxisLabel = $label;
return $this; return $this;
@ -292,7 +293,8 @@ class PHPExcel_Chart
* *
* @return PHPExcel_Chart_Title * @return PHPExcel_Chart_Title
*/ */
public function getYAxisLabel() { public function getYAxisLabel()
{
return $this->_yAxisLabel; return $this->_yAxisLabel;
} }
@ -313,7 +315,8 @@ class PHPExcel_Chart
* *
* @return PHPExcel_Chart_PlotArea * @return PHPExcel_Chart_PlotArea
*/ */
public function getPlotArea() { public function getPlotArea()
{
return $this->_plotArea; return $this->_plotArea;
} }
@ -322,7 +325,8 @@ class PHPExcel_Chart
* *
* @return boolean * @return boolean
*/ */
public function getPlotVisibleOnly() { public function getPlotVisibleOnly()
{
return $this->_plotVisibleOnly; return $this->_plotVisibleOnly;
} }
@ -332,7 +336,8 @@ class PHPExcel_Chart
* @param boolean $plotVisibleOnly * @param boolean $plotVisibleOnly
* @return PHPExcel_Chart * @return PHPExcel_Chart
*/ */
public function setPlotVisibleOnly($plotVisibleOnly = true) { public function setPlotVisibleOnly($plotVisibleOnly = true)
{
$this->_plotVisibleOnly = $plotVisibleOnly; $this->_plotVisibleOnly = $plotVisibleOnly;
return $this; return $this;
@ -343,7 +348,8 @@ class PHPExcel_Chart
* *
* @return string * @return string
*/ */
public function getDisplayBlanksAs() { public function getDisplayBlanksAs()
{
return $this->_displayBlanksAs; return $this->_displayBlanksAs;
} }
@ -353,7 +359,8 @@ class PHPExcel_Chart
* @param string $displayBlanksAs * @param string $displayBlanksAs
* @return PHPExcel_Chart * @return PHPExcel_Chart
*/ */
public function setDisplayBlanksAs($displayBlanksAs = '0') { public function setDisplayBlanksAs($displayBlanksAs = '0')
{
$this->_displayBlanksAs = $displayBlanksAs; $this->_displayBlanksAs = $displayBlanksAs;
} }
@ -363,8 +370,9 @@ class PHPExcel_Chart
* *
* @return PHPExcel_Chart_Axis * @return PHPExcel_Chart_Axis
*/ */
public function getChartAxisY() { public function getChartAxisY()
if($this->_yAxis !== NULL){ {
if ($this->_yAxis !== null) {
return $this->_yAxis; return $this->_yAxis;
} }
@ -376,8 +384,9 @@ class PHPExcel_Chart
* *
* @return PHPExcel_Chart_Axis * @return PHPExcel_Chart_Axis
*/ */
public function getChartAxisX() { public function getChartAxisX()
if($this->_xAxis !== NULL){ {
if ($this->_xAxis !== null) {
return $this->_xAxis; return $this->_xAxis;
} }
@ -389,8 +398,9 @@ class PHPExcel_Chart
* *
* @return PHPExcel_Chart_GridLines * @return PHPExcel_Chart_GridLines
*/ */
public function getMajorGridlines() { public function getMajorGridlines()
if($this->_majorGridlines !== NULL){ {
if ($this->_majorGridlines !== null) {
return $this->_majorGridlines; return $this->_majorGridlines;
} }
@ -402,8 +412,9 @@ class PHPExcel_Chart
* *
* @return PHPExcel_Chart_GridLines * @return PHPExcel_Chart_GridLines
*/ */
public function getMinorGridlines() { public function getMinorGridlines()
if($this->_minorGridlines !== NULL){ {
if ($this->_minorGridlines !== null) {
return $this->_minorGridlines; return $this->_minorGridlines;
} }
@ -419,12 +430,15 @@ class PHPExcel_Chart
* @param integer $yOffset * @param integer $yOffset
* @return PHPExcel_Chart * @return PHPExcel_Chart
*/ */
public function setTopLeftPosition($cell, $xOffset=null, $yOffset=null) { public function setTopLeftPosition($cell, $xOffset=null, $yOffset=null)
{
$this->_topLeftCellRef = $cell; $this->_topLeftCellRef = $cell;
if (!is_null($xOffset)) if (!is_null($xOffset)) {
$this->setTopLeftXOffset($xOffset); $this->setTopLeftXOffset($xOffset);
if (!is_null($yOffset)) }
if (!is_null($yOffset)) {
$this->setTopLeftYOffset($yOffset); $this->setTopLeftYOffset($yOffset);
}
return $this; return $this;
} }
@ -434,8 +448,10 @@ class PHPExcel_Chart
* *
* @return array an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell * @return array an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell
*/ */
public function getTopLeftPosition() { public function getTopLeftPosition()
return array( 'cell' => $this->_topLeftCellRef, {
return array(
'cell' => $this->_topLeftCellRef,
'xOffset' => $this->_topLeftXOffset, 'xOffset' => $this->_topLeftXOffset,
'yOffset' => $this->_topLeftYOffset 'yOffset' => $this->_topLeftYOffset
); );
@ -446,7 +462,8 @@ class PHPExcel_Chart
* *
* @return string * @return string
*/ */
public function getTopLeftCell() { public function getTopLeftCell()
{
return $this->_topLeftCellRef; return $this->_topLeftCellRef;
} }
@ -456,7 +473,8 @@ class PHPExcel_Chart
* @param string $cell * @param string $cell
* @return PHPExcel_Chart * @return PHPExcel_Chart
*/ */
public function setTopLeftCell($cell) { public function setTopLeftCell($cell)
{
$this->_topLeftCellRef = $cell; $this->_topLeftCellRef = $cell;
return $this; return $this;
@ -469,11 +487,14 @@ class PHPExcel_Chart
* @param integer $yOffset * @param integer $yOffset
* @return PHPExcel_Chart * @return PHPExcel_Chart
*/ */
public function setTopLeftOffset($xOffset=null,$yOffset=null) { public function setTopLeftOffset($xOffset = null, $yOffset = null)
if (!is_null($xOffset)) {
if (!is_null($xOffset)) {
$this->setTopLeftXOffset($xOffset); $this->setTopLeftXOffset($xOffset);
if (!is_null($yOffset)) }
if (!is_null($yOffset)) {
$this->setTopLeftYOffset($yOffset); $this->setTopLeftYOffset($yOffset);
}
return $this; return $this;
} }
@ -483,29 +504,35 @@ class PHPExcel_Chart
* *
* @return integer[] * @return integer[]
*/ */
public function getTopLeftOffset() { public function getTopLeftOffset()
return array( 'X' => $this->_topLeftXOffset, {
return array(
'X' => $this->_topLeftXOffset,
'Y' => $this->_topLeftYOffset 'Y' => $this->_topLeftYOffset
); );
} }
public function setTopLeftXOffset($xOffset) { public function setTopLeftXOffset($xOffset)
{
$this->_topLeftXOffset = $xOffset; $this->_topLeftXOffset = $xOffset;
return $this; return $this;
} }
public function getTopLeftXOffset() { public function getTopLeftXOffset()
{
return $this->_topLeftXOffset; return $this->_topLeftXOffset;
} }
public function setTopLeftYOffset($yOffset) { public function setTopLeftYOffset($yOffset)
{
$this->_topLeftYOffset = $yOffset; $this->_topLeftYOffset = $yOffset;
return $this; return $this;
} }
public function getTopLeftYOffset() { public function getTopLeftYOffset()
{
return $this->_topLeftYOffset; return $this->_topLeftYOffset;
} }
@ -517,12 +544,15 @@ class PHPExcel_Chart
* @param integer $yOffset * @param integer $yOffset
* @return PHPExcel_Chart * @return PHPExcel_Chart
*/ */
public function setBottomRightPosition($cell, $xOffset=null, $yOffset=null) { public function setBottomRightPosition($cell, $xOffset = null, $yOffset = null)
{
$this->_bottomRightCellRef = $cell; $this->_bottomRightCellRef = $cell;
if (!is_null($xOffset)) if (!is_null($xOffset)) {
$this->setBottomRightXOffset($xOffset); $this->setBottomRightXOffset($xOffset);
if (!is_null($yOffset)) }
if (!is_null($yOffset)) {
$this->setBottomRightYOffset($yOffset); $this->setBottomRightYOffset($yOffset);
}
return $this; return $this;
} }
@ -532,14 +562,17 @@ class PHPExcel_Chart
* *
* @return array an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell * @return array an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell
*/ */
public function getBottomRightPosition() { public function getBottomRightPosition()
return array( 'cell' => $this->_bottomRightCellRef, {
return array(
'cell' => $this->_bottomRightCellRef,
'xOffset' => $this->_bottomRightXOffset, 'xOffset' => $this->_bottomRightXOffset,
'yOffset' => $this->_bottomRightYOffset 'yOffset' => $this->_bottomRightYOffset
); );
} }
public function setBottomRightCell($cell) { public function setBottomRightCell($cell)
{
$this->_bottomRightCellRef = $cell; $this->_bottomRightCellRef = $cell;
return $this; return $this;
@ -550,7 +583,8 @@ class PHPExcel_Chart
* *
* @return string * @return string
*/ */
public function getBottomRightCell() { public function getBottomRightCell()
{
return $this->_bottomRightCellRef; return $this->_bottomRightCellRef;
} }
@ -561,11 +595,14 @@ class PHPExcel_Chart
* @param integer $yOffset * @param integer $yOffset
* @return PHPExcel_Chart * @return PHPExcel_Chart
*/ */
public function setBottomRightOffset($xOffset=null,$yOffset=null) { public function setBottomRightOffset($xOffset = null, $yOffset = null)
if (!is_null($xOffset)) {
if (!is_null($xOffset)) {
$this->setBottomRightXOffset($xOffset); $this->setBottomRightXOffset($xOffset);
if (!is_null($yOffset)) }
if (!is_null($yOffset)) {
$this->setBottomRightYOffset($yOffset); $this->setBottomRightYOffset($yOffset);
}
return $this; return $this;
} }
@ -575,40 +612,48 @@ class PHPExcel_Chart
* *
* @return integer[] * @return integer[]
*/ */
public function getBottomRightOffset() { public function getBottomRightOffset()
return array( 'X' => $this->_bottomRightXOffset, {
return array(
'X' => $this->_bottomRightXOffset,
'Y' => $this->_bottomRightYOffset 'Y' => $this->_bottomRightYOffset
); );
} }
public function setBottomRightXOffset($xOffset) { public function setBottomRightXOffset($xOffset)
{
$this->_bottomRightXOffset = $xOffset; $this->_bottomRightXOffset = $xOffset;
return $this; return $this;
} }
public function getBottomRightXOffset() { public function getBottomRightXOffset()
{
return $this->_bottomRightXOffset; return $this->_bottomRightXOffset;
} }
public function setBottomRightYOffset($yOffset) { public function setBottomRightYOffset($yOffset)
{
$this->_bottomRightYOffset = $yOffset; $this->_bottomRightYOffset = $yOffset;
return $this; return $this;
} }
public function getBottomRightYOffset() { public function getBottomRightYOffset()
{
return $this->_bottomRightYOffset; return $this->_bottomRightYOffset;
} }
public function refresh() { public function refresh()
if ($this->_worksheet !== NULL) { {
if ($this->_worksheet !== null) {
$this->_plotArea->refresh($this->_worksheet); $this->_plotArea->refresh($this->_worksheet);
} }
} }
public function render($outputDestination = null) { public function render($outputDestination = null)
{
$libraryName = PHPExcel_Settings::getChartRendererName(); $libraryName = PHPExcel_Settings::getChartRendererName();
if (is_null($libraryName)) { if (is_null($libraryName)) {
return false; return false;
@ -631,5 +676,4 @@ class PHPExcel_Chart
} }
return $renderer->render($outputDestination); return $renderer->render($outputDestination);
} }
} }

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Comment
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Comment
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Comment implements PHPExcel_IComparable class PHPExcel_Comment implements PHPExcel_IComparable
{ {
/** /**

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_DocumentProperties
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_DocumentProperties
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_DocumentProperties class PHPExcel_DocumentProperties
{ {
/** constants */ /** constants */
@ -144,7 +136,8 @@ class PHPExcel_DocumentProperties
* *
* @return string * @return string
*/ */
public function getCreator() { public function getCreator()
{
return $this->_creator; return $this->_creator;
} }
@ -154,7 +147,8 @@ class PHPExcel_DocumentProperties
* @param string $pValue * @param string $pValue
* @return PHPExcel_DocumentProperties * @return PHPExcel_DocumentProperties
*/ */
public function setCreator($pValue = '') { public function setCreator($pValue = '')
{
$this->_creator = $pValue; $this->_creator = $pValue;
return $this; return $this;
} }
@ -164,7 +158,8 @@ class PHPExcel_DocumentProperties
* *
* @return string * @return string
*/ */
public function getLastModifiedBy() { public function getLastModifiedBy()
{
return $this->_lastModifiedBy; return $this->_lastModifiedBy;
} }
@ -174,7 +169,8 @@ class PHPExcel_DocumentProperties
* @param string $pValue * @param string $pValue
* @return PHPExcel_DocumentProperties * @return PHPExcel_DocumentProperties
*/ */
public function setLastModifiedBy($pValue = '') { public function setLastModifiedBy($pValue = '')
{
$this->_lastModifiedBy = $pValue; $this->_lastModifiedBy = $pValue;
return $this; return $this;
} }
@ -184,7 +180,8 @@ class PHPExcel_DocumentProperties
* *
* @return datetime * @return datetime
*/ */
public function getCreated() { public function getCreated()
{
return $this->_created; return $this->_created;
} }
@ -194,8 +191,9 @@ class PHPExcel_DocumentProperties
* @param datetime $pValue * @param datetime $pValue
* @return PHPExcel_DocumentProperties * @return PHPExcel_DocumentProperties
*/ */
public function setCreated($pValue = null) { public function setCreated($pValue = null)
if ($pValue === NULL) { {
if ($pValue === null) {
$pValue = time(); $pValue = time();
} elseif (is_string($pValue)) { } elseif (is_string($pValue)) {
if (is_numeric($pValue)) { if (is_numeric($pValue)) {
@ -214,7 +212,8 @@ class PHPExcel_DocumentProperties
* *
* @return datetime * @return datetime
*/ */
public function getModified() { public function getModified()
{
return $this->_modified; return $this->_modified;
} }
@ -224,8 +223,9 @@ class PHPExcel_DocumentProperties
* @param datetime $pValue * @param datetime $pValue
* @return PHPExcel_DocumentProperties * @return PHPExcel_DocumentProperties
*/ */
public function setModified($pValue = null) { public function setModified($pValue = null)
if ($pValue === NULL) { {
if ($pValue === null) {
$pValue = time(); $pValue = time();
} elseif (is_string($pValue)) { } elseif (is_string($pValue)) {
if (is_numeric($pValue)) { if (is_numeric($pValue)) {
@ -244,7 +244,8 @@ class PHPExcel_DocumentProperties
* *
* @return string * @return string
*/ */
public function getTitle() { public function getTitle()
{
return $this->_title; return $this->_title;
} }
@ -254,7 +255,8 @@ class PHPExcel_DocumentProperties
* @param string $pValue * @param string $pValue
* @return PHPExcel_DocumentProperties * @return PHPExcel_DocumentProperties
*/ */
public function setTitle($pValue = '') { public function setTitle($pValue = '')
{
$this->_title = $pValue; $this->_title = $pValue;
return $this; return $this;
} }
@ -264,7 +266,8 @@ class PHPExcel_DocumentProperties
* *
* @return string * @return string
*/ */
public function getDescription() { public function getDescription()
{
return $this->_description; return $this->_description;
} }
@ -274,7 +277,8 @@ class PHPExcel_DocumentProperties
* @param string $pValue * @param string $pValue
* @return PHPExcel_DocumentProperties * @return PHPExcel_DocumentProperties
*/ */
public function setDescription($pValue = '') { public function setDescription($pValue = '')
{
$this->_description = $pValue; $this->_description = $pValue;
return $this; return $this;
} }
@ -284,7 +288,8 @@ class PHPExcel_DocumentProperties
* *
* @return string * @return string
*/ */
public function getSubject() { public function getSubject()
{
return $this->_subject; return $this->_subject;
} }
@ -294,7 +299,8 @@ class PHPExcel_DocumentProperties
* @param string $pValue * @param string $pValue
* @return PHPExcel_DocumentProperties * @return PHPExcel_DocumentProperties
*/ */
public function setSubject($pValue = '') { public function setSubject($pValue = '')
{
$this->_subject = $pValue; $this->_subject = $pValue;
return $this; return $this;
} }
@ -304,7 +310,8 @@ class PHPExcel_DocumentProperties
* *
* @return string * @return string
*/ */
public function getKeywords() { public function getKeywords()
{
return $this->_keywords; return $this->_keywords;
} }
@ -314,7 +321,8 @@ class PHPExcel_DocumentProperties
* @param string $pValue * @param string $pValue
* @return PHPExcel_DocumentProperties * @return PHPExcel_DocumentProperties
*/ */
public function setKeywords($pValue = '') { public function setKeywords($pValue = '')
{
$this->_keywords = $pValue; $this->_keywords = $pValue;
return $this; return $this;
} }
@ -324,7 +332,8 @@ class PHPExcel_DocumentProperties
* *
* @return string * @return string
*/ */
public function getCategory() { public function getCategory()
{
return $this->_category; return $this->_category;
} }
@ -334,7 +343,8 @@ class PHPExcel_DocumentProperties
* @param string $pValue * @param string $pValue
* @return PHPExcel_DocumentProperties * @return PHPExcel_DocumentProperties
*/ */
public function setCategory($pValue = '') { public function setCategory($pValue = '')
{
$this->_category = $pValue; $this->_category = $pValue;
return $this; return $this;
} }
@ -344,7 +354,8 @@ class PHPExcel_DocumentProperties
* *
* @return string * @return string
*/ */
public function getCompany() { public function getCompany()
{
return $this->_company; return $this->_company;
} }
@ -354,7 +365,8 @@ class PHPExcel_DocumentProperties
* @param string $pValue * @param string $pValue
* @return PHPExcel_DocumentProperties * @return PHPExcel_DocumentProperties
*/ */
public function setCompany($pValue = '') { public function setCompany($pValue = '')
{
$this->_company = $pValue; $this->_company = $pValue;
return $this; return $this;
} }
@ -364,7 +376,8 @@ class PHPExcel_DocumentProperties
* *
* @return string * @return string
*/ */
public function getManager() { public function getManager()
{
return $this->_manager; return $this->_manager;
} }
@ -374,7 +387,8 @@ class PHPExcel_DocumentProperties
* @param string $pValue * @param string $pValue
* @return PHPExcel_DocumentProperties * @return PHPExcel_DocumentProperties
*/ */
public function setManager($pValue = '') { public function setManager($pValue = '')
{
$this->_manager = $pValue; $this->_manager = $pValue;
return $this; return $this;
} }
@ -384,7 +398,8 @@ class PHPExcel_DocumentProperties
* *
* @return array of string * @return array of string
*/ */
public function getCustomProperties() { public function getCustomProperties()
{
return array_keys($this->_customProperties); return array_keys($this->_customProperties);
} }
@ -394,7 +409,8 @@ class PHPExcel_DocumentProperties
* @param string $propertyName * @param string $propertyName
* @return boolean * @return boolean
*/ */
public function isCustomPropertySet($propertyName) { public function isCustomPropertySet($propertyName)
{
return isset($this->_customProperties[$propertyName]); return isset($this->_customProperties[$propertyName]);
} }
@ -404,7 +420,8 @@ class PHPExcel_DocumentProperties
* @param string $propertyName * @param string $propertyName
* @return string * @return string
*/ */
public function getCustomPropertyValue($propertyName) { public function getCustomPropertyValue($propertyName)
{
if (isset($this->_customProperties[$propertyName])) { if (isset($this->_customProperties[$propertyName])) {
return $this->_customProperties[$propertyName]['value']; return $this->_customProperties[$propertyName]['value'];
} }
@ -417,7 +434,8 @@ class PHPExcel_DocumentProperties
* @param string $propertyName * @param string $propertyName
* @return string * @return string
*/ */
public function getCustomPropertyType($propertyName) { public function getCustomPropertyType($propertyName)
{
if (isset($this->_customProperties[$propertyName])) { if (isset($this->_customProperties[$propertyName])) {
return $this->_customProperties[$propertyName]['type']; return $this->_customProperties[$propertyName]['type'];
} }
@ -437,13 +455,14 @@ class PHPExcel_DocumentProperties
* 'b' : Boolean * 'b' : Boolean
* @return PHPExcel_DocumentProperties * @return PHPExcel_DocumentProperties
*/ */
public function setCustomProperty($propertyName,$propertyValue='',$propertyType=NULL) { public function setCustomProperty($propertyName, $propertyValue = '', $propertyType = null)
if (($propertyType === NULL) || (!in_array($propertyType,array(self::PROPERTY_TYPE_INTEGER, {
if (($propertyType === null) || (!in_array($propertyType, array(self::PROPERTY_TYPE_INTEGER,
self::PROPERTY_TYPE_FLOAT, self::PROPERTY_TYPE_FLOAT,
self::PROPERTY_TYPE_STRING, self::PROPERTY_TYPE_STRING,
self::PROPERTY_TYPE_DATE, self::PROPERTY_TYPE_DATE,
self::PROPERTY_TYPE_BOOLEAN)))) { self::PROPERTY_TYPE_BOOLEAN)))) {
if ($propertyValue === NULL) { if ($propertyValue === null) {
$propertyType = self::PROPERTY_TYPE_STRING; $propertyType = self::PROPERTY_TYPE_STRING;
} elseif (is_float($propertyValue)) { } elseif (is_float($propertyValue)) {
$propertyType = self::PROPERTY_TYPE_FLOAT; $propertyType = self::PROPERTY_TYPE_FLOAT;
@ -456,14 +475,18 @@ class PHPExcel_DocumentProperties
} }
} }
$this->_customProperties[$propertyName] = array('value' => $propertyValue, 'type' => $propertyType); $this->_customProperties[$propertyName] = array(
'value' => $propertyValue,
'type' => $propertyType
);
return $this; return $this;
} }
/** /**
* Implement PHP __clone to create a deep clone, not just a shallow copy. * Implement PHP __clone to create a deep clone, not just a shallow copy.
*/ */
public function __clone() { public function __clone()
{
$vars = get_object_vars($this); $vars = get_object_vars($this);
foreach ($vars as $key => $value) { foreach ($vars as $key => $value) {
if (is_object($value)) { if (is_object($value)) {
@ -474,58 +497,59 @@ class PHPExcel_DocumentProperties
} }
} }
public static function convertProperty($propertyValue,$propertyType) { public static function convertProperty($propertyValue,$propertyType)
{
switch ($propertyType) { switch ($propertyType) {
case 'empty' : // Empty case 'empty': // Empty
return ''; return '';
break; break;
case 'null' : // Null case 'null': // Null
return NULL; return null;
break; break;
case 'i1' : // 1-Byte Signed Integer case 'i1': // 1-Byte Signed Integer
case 'i2' : // 2-Byte Signed Integer case 'i2': // 2-Byte Signed Integer
case 'i4' : // 4-Byte Signed Integer case 'i4': // 4-Byte Signed Integer
case 'i8' : // 8-Byte Signed Integer case 'i8': // 8-Byte Signed Integer
case 'int' : // Integer case 'int': // Integer
return (int) $propertyValue; return (int) $propertyValue;
break; break;
case 'ui1' : // 1-Byte Unsigned Integer case 'ui1': // 1-Byte Unsigned Integer
case 'ui2' : // 2-Byte Unsigned Integer case 'ui2': // 2-Byte Unsigned Integer
case 'ui4' : // 4-Byte Unsigned Integer case 'ui4': // 4-Byte Unsigned Integer
case 'ui8' : // 8-Byte Unsigned Integer case 'ui8': // 8-Byte Unsigned Integer
case 'uint' : // Unsigned Integer case 'uint': // Unsigned Integer
return abs((int) $propertyValue); return abs((int) $propertyValue);
break; break;
case 'r4' : // 4-Byte Real Number case 'r4': // 4-Byte Real Number
case 'r8' : // 8-Byte Real Number case 'r8': // 8-Byte Real Number
case 'decimal' : // Decimal case 'decimal': // Decimal
return (float) $propertyValue; return (float) $propertyValue;
break; break;
case 'lpstr' : // LPSTR case 'lpstr': // LPSTR
case 'lpwstr' : // LPWSTR case 'lpwstr': // LPWSTR
case 'bstr' : // Basic String case 'bstr': // Basic String
return $propertyValue; return $propertyValue;
break; break;
case 'date' : // Date and Time case 'date': // Date and Time
case 'filetime' : // File Time case 'filetime': // File Time
return strtotime($propertyValue); return strtotime($propertyValue);
break; break;
case 'bool' : // Boolean case 'bool': // Boolean
return ($propertyValue == 'true') ? True : False; return ($propertyValue == 'true') ? True : False;
break; break;
case 'cy' : // Currency case 'cy': // Currency
case 'error' : // Error Status Code case 'error': // Error Status Code
case 'vector' : // Vector case 'vector': // Vector
case 'array' : // Array case 'array': // Array
case 'blob' : // Binary Blob case 'blob': // Binary Blob
case 'oblob' : // Binary Blob Object case 'oblob': // Binary Blob Object
case 'stream' : // Binary Stream case 'stream': // Binary Stream
case 'ostream' : // Binary Stream Object case 'ostream': // Binary Stream Object
case 'storage' : // Binary Storage case 'storage': // Binary Storage
case 'ostorage' : // Binary Storage Object case 'ostorage': // Binary Storage Object
case 'vstream' : // Binary Versioned Stream case 'vstream': // Binary Versioned Stream
case 'clsid' : // Class ID case 'clsid': // Class ID
case 'cf' : // Clipboard Data case 'cf': // Clipboard Data
return $propertyValue; return $propertyValue;
break; break;
} }
@ -534,50 +558,50 @@ class PHPExcel_DocumentProperties
public static function convertPropertyType($propertyType) { public static function convertPropertyType($propertyType) {
switch ($propertyType) { switch ($propertyType) {
case 'i1' : // 1-Byte Signed Integer case 'i1': // 1-Byte Signed Integer
case 'i2' : // 2-Byte Signed Integer case 'i2': // 2-Byte Signed Integer
case 'i4' : // 4-Byte Signed Integer case 'i4': // 4-Byte Signed Integer
case 'i8' : // 8-Byte Signed Integer case 'i8': // 8-Byte Signed Integer
case 'int' : // Integer case 'int': // Integer
case 'ui1' : // 1-Byte Unsigned Integer case 'ui1': // 1-Byte Unsigned Integer
case 'ui2' : // 2-Byte Unsigned Integer case 'ui2': // 2-Byte Unsigned Integer
case 'ui4' : // 4-Byte Unsigned Integer case 'ui4': // 4-Byte Unsigned Integer
case 'ui8' : // 8-Byte Unsigned Integer case 'ui8': // 8-Byte Unsigned Integer
case 'uint' : // Unsigned Integer case 'uint': // Unsigned Integer
return self::PROPERTY_TYPE_INTEGER; return self::PROPERTY_TYPE_INTEGER;
break; break;
case 'r4' : // 4-Byte Real Number case 'r4': // 4-Byte Real Number
case 'r8' : // 8-Byte Real Number case 'r8': // 8-Byte Real Number
case 'decimal' : // Decimal case 'decimal': // Decimal
return self::PROPERTY_TYPE_FLOAT; return self::PROPERTY_TYPE_FLOAT;
break; break;
case 'empty' : // Empty case 'empty': // Empty
case 'null' : // Null case 'null': // Null
case 'lpstr' : // LPSTR case 'lpstr': // LPSTR
case 'lpwstr' : // LPWSTR case 'lpwstr': // LPWSTR
case 'bstr' : // Basic String case 'bstr': // Basic String
return self::PROPERTY_TYPE_STRING; return self::PROPERTY_TYPE_STRING;
break; break;
case 'date' : // Date and Time case 'date': // Date and Time
case 'filetime' : // File Time case 'filetime': // File Time
return self::PROPERTY_TYPE_DATE; return self::PROPERTY_TYPE_DATE;
break; break;
case 'bool' : // Boolean case 'bool': // Boolean
return self::PROPERTY_TYPE_BOOLEAN; return self::PROPERTY_TYPE_BOOLEAN;
break; break;
case 'cy' : // Currency case 'cy': // Currency
case 'error' : // Error Status Code case 'error': // Error Status Code
case 'vector' : // Vector case 'vector': // Vector
case 'array' : // Array case 'array': // Array
case 'blob' : // Binary Blob case 'blob': // Binary Blob
case 'oblob' : // Binary Blob Object case 'oblob': // Binary Blob Object
case 'stream' : // Binary Stream case 'stream': // Binary Stream
case 'ostream' : // Binary Stream Object case 'ostream': // Binary Stream Object
case 'storage' : // Binary Storage case 'storage': // Binary Storage
case 'ostorage' : // Binary Storage Object case 'ostorage': // Binary Storage Object
case 'vstream' : // Binary Versioned Stream case 'vstream': // Binary Versioned Stream
case 'clsid' : // Class ID case 'clsid': // Class ID
case 'cf' : // Clipboard Data case 'cf': // Clipboard Data
return self::PROPERTY_TYPE_UNKNOWN; return self::PROPERTY_TYPE_UNKNOWN;
break; break;
} }

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_DocumentSecurity
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_DocumentSecurity
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_DocumentSecurity class PHPExcel_DocumentSecurity
{ {
/** /**
@ -88,7 +80,8 @@ class PHPExcel_DocumentSecurity
* *
* @return boolean * @return boolean
*/ */
function isSecurityEnabled() { function isSecurityEnabled()
{
return $this->_lockRevision || return $this->_lockRevision ||
$this->_lockStructure || $this->_lockStructure ||
$this->_lockWindows; $this->_lockWindows;
@ -99,7 +92,8 @@ class PHPExcel_DocumentSecurity
* *
* @return boolean * @return boolean
*/ */
function getLockRevision() { function getLockRevision()
{
return $this->_lockRevision; return $this->_lockRevision;
} }
@ -109,7 +103,8 @@ class PHPExcel_DocumentSecurity
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_DocumentSecurity * @return PHPExcel_DocumentSecurity
*/ */
function setLockRevision($pValue = false) { function setLockRevision($pValue = false)
{
$this->_lockRevision = $pValue; $this->_lockRevision = $pValue;
return $this; return $this;
} }
@ -119,7 +114,8 @@ class PHPExcel_DocumentSecurity
* *
* @return boolean * @return boolean
*/ */
function getLockStructure() { function getLockStructure()
{
return $this->_lockStructure; return $this->_lockStructure;
} }
@ -129,7 +125,8 @@ class PHPExcel_DocumentSecurity
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_DocumentSecurity * @return PHPExcel_DocumentSecurity
*/ */
function setLockStructure($pValue = false) { function setLockStructure($pValue = false)
{
$this->_lockStructure = $pValue; $this->_lockStructure = $pValue;
return $this; return $this;
} }
@ -139,7 +136,8 @@ class PHPExcel_DocumentSecurity
* *
* @return boolean * @return boolean
*/ */
function getLockWindows() { function getLockWindows()
{
return $this->_lockWindows; return $this->_lockWindows;
} }
@ -149,7 +147,8 @@ class PHPExcel_DocumentSecurity
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_DocumentSecurity * @return PHPExcel_DocumentSecurity
*/ */
function setLockWindows($pValue = false) { function setLockWindows($pValue = false)
{
$this->_lockWindows = $pValue; $this->_lockWindows = $pValue;
return $this; return $this;
} }
@ -159,7 +158,8 @@ class PHPExcel_DocumentSecurity
* *
* @return string * @return string
*/ */
function getRevisionsPassword() { function getRevisionsPassword()
{
return $this->_revisionsPassword; return $this->_revisionsPassword;
} }
@ -170,7 +170,8 @@ class PHPExcel_DocumentSecurity
* @param boolean $pAlreadyHashed If the password has already been hashed, set this to true * @param boolean $pAlreadyHashed If the password has already been hashed, set this to true
* @return PHPExcel_DocumentSecurity * @return PHPExcel_DocumentSecurity
*/ */
function setRevisionsPassword($pValue = '', $pAlreadyHashed = false) { function setRevisionsPassword($pValue = '', $pAlreadyHashed = false)
{
if (!$pAlreadyHashed) { if (!$pAlreadyHashed) {
$pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue); $pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue);
} }
@ -183,7 +184,8 @@ class PHPExcel_DocumentSecurity
* *
* @return string * @return string
*/ */
function getWorkbookPassword() { function getWorkbookPassword()
{
return $this->_workbookPassword; return $this->_workbookPassword;
} }
@ -194,7 +196,8 @@ class PHPExcel_DocumentSecurity
* @param boolean $pAlreadyHashed If the password has already been hashed, set this to true * @param boolean $pAlreadyHashed If the password has already been hashed, set this to true
* @return PHPExcel_DocumentSecurity * @return PHPExcel_DocumentSecurity
*/ */
function setWorkbookPassword($pValue = '', $pAlreadyHashed = false) { function setWorkbookPassword($pValue = '', $pAlreadyHashed = false)
{
if (!$pAlreadyHashed) { if (!$pAlreadyHashed) {
$pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue); $pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue);
} }
@ -205,7 +208,8 @@ class PHPExcel_DocumentSecurity
/** /**
* Implement PHP __clone to create a deep clone, not just a shallow copy. * Implement PHP __clone to create a deep clone, not just a shallow copy.
*/ */
public function __clone() { public function __clone()
{
$vars = get_object_vars($this); $vars = get_object_vars($this);
foreach ($vars as $key => $value) { foreach ($vars as $key => $value) {
if (is_object($value)) { if (is_object($value)) {

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_HashTable
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_HashTable
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_HashTable class PHPExcel_HashTable
{ {
/** /**
@ -57,7 +49,7 @@ class PHPExcel_HashTable
*/ */
public function __construct($pSource = null) public function __construct($pSource = null)
{ {
if ($pSource !== NULL) { if ($pSource !== null) {
// Create HashTable // Create HashTable
$this->addFromSource($pSource); $this->addFromSource($pSource);
} }
@ -69,7 +61,8 @@ class PHPExcel_HashTable
* @param PHPExcel_IComparable[] $pSource Source array to create HashTable from * @param PHPExcel_IComparable[] $pSource Source array to create HashTable from
* @throws PHPExcel_Exception * @throws PHPExcel_Exception
*/ */
public function addFromSource($pSource = null) { public function addFromSource($pSource = null)
{
// Check if an array was passed // Check if an array was passed
if ($pSource == null) { if ($pSource == null) {
return; return;
@ -88,7 +81,8 @@ class PHPExcel_HashTable
* @param PHPExcel_IComparable $pSource Item to add * @param PHPExcel_IComparable $pSource Item to add
* @throws PHPExcel_Exception * @throws PHPExcel_Exception
*/ */
public function add(PHPExcel_IComparable $pSource = null) { public function add(PHPExcel_IComparable $pSource = null)
{
$hash = $pSource->getHashCode(); $hash = $pSource->getHashCode();
if (!isset($this->_items[$hash])) { if (!isset($this->_items[$hash])) {
$this->_items[$hash] = $pSource; $this->_items[$hash] = $pSource;
@ -102,7 +96,8 @@ class PHPExcel_HashTable
* @param PHPExcel_IComparable $pSource Item to remove * @param PHPExcel_IComparable $pSource Item to remove
* @throws PHPExcel_Exception * @throws PHPExcel_Exception
*/ */
public function remove(PHPExcel_IComparable $pSource = null) { public function remove(PHPExcel_IComparable $pSource = null)
{
$hash = $pSource->getHashCode(); $hash = $pSource->getHashCode();
if (isset($this->_items[$hash])) { if (isset($this->_items[$hash])) {
unset($this->_items[$hash]); unset($this->_items[$hash]);
@ -125,7 +120,8 @@ class PHPExcel_HashTable
* Clear HashTable * Clear HashTable
* *
*/ */
public function clear() { public function clear()
{
$this->_items = array(); $this->_items = array();
$this->_keyMap = array(); $this->_keyMap = array();
} }
@ -135,7 +131,8 @@ class PHPExcel_HashTable
* *
* @return int * @return int
*/ */
public function count() { public function count()
{
return count($this->_items); return count($this->_items);
} }
@ -145,7 +142,8 @@ class PHPExcel_HashTable
* @param string $pHashCode * @param string $pHashCode
* @return int Index * @return int Index
*/ */
public function getIndexForHashCode($pHashCode = '') { public function getIndexForHashCode($pHashCode = '')
{
return array_search($pHashCode, $this->_keyMap); return array_search($pHashCode, $this->_keyMap);
} }
@ -156,7 +154,8 @@ class PHPExcel_HashTable
* @return PHPExcel_IComparable * @return PHPExcel_IComparable
* *
*/ */
public function getByIndex($pIndex = 0) { public function getByIndex($pIndex = 0)
{
if (isset($this->_keyMap[$pIndex])) { if (isset($this->_keyMap[$pIndex])) {
return $this->getByHashCode( $this->_keyMap[$pIndex] ); return $this->getByHashCode( $this->_keyMap[$pIndex] );
} }
@ -171,7 +170,8 @@ class PHPExcel_HashTable
* @return PHPExcel_IComparable * @return PHPExcel_IComparable
* *
*/ */
public function getByHashCode($pHashCode = '') { public function getByHashCode($pHashCode = '')
{
if (isset($this->_items[$pHashCode])) { if (isset($this->_items[$pHashCode])) {
return $this->_items[$pHashCode]; return $this->_items[$pHashCode];
} }
@ -184,14 +184,16 @@ class PHPExcel_HashTable
* *
* @return PHPExcel_IComparable[] * @return PHPExcel_IComparable[]
*/ */
public function toArray() { public function toArray()
{
return $this->_items; return $this->_items;
} }
/** /**
* Implement PHP __clone to create a deep clone, not just a shallow copy. * Implement PHP __clone to create a deep clone, not just a shallow copy.
*/ */
public function __clone() { public function __clone()
{
$vars = get_object_vars($this); $vars = get_object_vars($this);
foreach ($vars as $key => $value) { foreach ($vars as $key => $value) {
if (is_object($value)) { if (is_object($value)) {

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_IComparable
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -22,15 +23,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_IComparable
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
interface PHPExcel_IComparable interface PHPExcel_IComparable
{ {
/** /**

View File

@ -1,6 +1,16 @@
<?php <?php
/** PHPExcel root directory */
if (!defined('PHPEXCEL_ROOT')) {
/**
* @ignore
*/
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
}
/** /**
* PHPExcel * PHPExcel_IOFactory
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,24 +34,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/** PHPExcel root directory */
if (!defined('PHPEXCEL_ROOT')) {
/**
* @ignore
*/
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
}
/**
* PHPExcel_IOFactory
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_IOFactory class PHPExcel_IOFactory
{ {
/** /**
@ -86,9 +78,10 @@ class PHPExcel_IOFactory
* @access public * @access public
* @return array * @return array
*/ */
public static function getSearchLocations() { public static function getSearchLocations()
{
return self::$_searchLocations; return self::$_searchLocations;
} // function getSearchLocations() }
/** /**
* Set search locations * Set search locations
@ -98,13 +91,14 @@ class PHPExcel_IOFactory
* @param array $value * @param array $value
* @throws PHPExcel_Reader_Exception * @throws PHPExcel_Reader_Exception
*/ */
public static function setSearchLocations($value) { public static function setSearchLocations($value)
{
if (is_array($value)) { if (is_array($value)) {
self::$_searchLocations = $value; self::$_searchLocations = $value;
} else { } else {
throw new PHPExcel_Reader_Exception('Invalid parameter passed.'); throw new PHPExcel_Reader_Exception('Invalid parameter passed.');
} }
} // function setSearchLocations() }
/** /**
* Add search location * Add search location
@ -115,9 +109,10 @@ class PHPExcel_IOFactory
* @param string $location Example: PHPExcel/Writer/{0}.php * @param string $location Example: PHPExcel/Writer/{0}.php
* @param string $classname Example: PHPExcel_Writer_{0} * @param string $classname Example: PHPExcel_Writer_{0}
*/ */
public static function addSearchLocation($type = '', $location = '', $classname = '') { public static function addSearchLocation($type = '', $location = '', $classname = '')
{
self::$_searchLocations[] = array( 'type' => $type, 'path' => $location, 'class' => $classname ); self::$_searchLocations[] = array( 'type' => $type, 'path' => $location, 'class' => $classname );
} // function addSearchLocation() }
/** /**
* Create PHPExcel_Writer_IWriter * Create PHPExcel_Writer_IWriter
@ -129,7 +124,8 @@ class PHPExcel_IOFactory
* @return PHPExcel_Writer_IWriter * @return PHPExcel_Writer_IWriter
* @throws PHPExcel_Reader_Exception * @throws PHPExcel_Reader_Exception
*/ */
public static function createWriter(PHPExcel $phpExcel, $writerType = '') { public static function createWriter(PHPExcel $phpExcel, $writerType = '')
{
// Search type // Search type
$searchType = 'IWriter'; $searchType = 'IWriter';
@ -147,7 +143,7 @@ class PHPExcel_IOFactory
// Nothing found... // Nothing found...
throw new PHPExcel_Reader_Exception("No $searchType found for type $writerType"); throw new PHPExcel_Reader_Exception("No $searchType found for type $writerType");
} // function createWriter() }
/** /**
* Create PHPExcel_Reader_IReader * Create PHPExcel_Reader_IReader
@ -158,7 +154,8 @@ class PHPExcel_IOFactory
* @return PHPExcel_Reader_IReader * @return PHPExcel_Reader_IReader
* @throws PHPExcel_Reader_Exception * @throws PHPExcel_Reader_Exception
*/ */
public static function createReader($readerType = '') { public static function createReader($readerType = '')
{
// Search type // Search type
$searchType = 'IReader'; $searchType = 'IReader';
@ -176,7 +173,7 @@ class PHPExcel_IOFactory
// Nothing found... // Nothing found...
throw new PHPExcel_Reader_Exception("No $searchType found for type $readerType"); throw new PHPExcel_Reader_Exception("No $searchType found for type $readerType");
} // function createReader() }
/** /**
* Loads PHPExcel from file using automatic PHPExcel_Reader_IReader resolution * Loads PHPExcel from file using automatic PHPExcel_Reader_IReader resolution
@ -187,10 +184,11 @@ class PHPExcel_IOFactory
* @return PHPExcel * @return PHPExcel
* @throws PHPExcel_Reader_Exception * @throws PHPExcel_Reader_Exception
*/ */
public static function load($pFilename) { public static function load($pFilename)
{
$reader = self::createReaderForFile($pFilename); $reader = self::createReaderForFile($pFilename);
return $reader->load($pFilename); return $reader->load($pFilename);
} // function load() }
/** /**
* Identify file type using automatic PHPExcel_Reader_IReader resolution * Identify file type using automatic PHPExcel_Reader_IReader resolution
@ -201,13 +199,14 @@ class PHPExcel_IOFactory
* @return string * @return string
* @throws PHPExcel_Reader_Exception * @throws PHPExcel_Reader_Exception
*/ */
public static function identify($pFilename) { public static function identify($pFilename)
{
$reader = self::createReaderForFile($pFilename); $reader = self::createReaderForFile($pFilename);
$className = get_class($reader); $className = get_class($reader);
$classType = explode('_',$className); $classType = explode('_',$className);
unset($reader); unset($reader);
return array_pop($classType); return array_pop($classType);
} // function identify() }
/** /**
* Create PHPExcel_Reader_IReader for file using automatic PHPExcel_Reader_IReader resolution * Create PHPExcel_Reader_IReader for file using automatic PHPExcel_Reader_IReader resolution
@ -218,8 +217,8 @@ class PHPExcel_IOFactory
* @return PHPExcel_Reader_IReader * @return PHPExcel_Reader_IReader
* @throws PHPExcel_Reader_Exception * @throws PHPExcel_Reader_Exception
*/ */
public static function createReaderForFile($pFilename) { public static function createReaderForFile($pFilename)
{
// First, lucky guess by inspecting file extension // First, lucky guess by inspecting file extension
$pathinfo = pathinfo($pFilename); $pathinfo = pathinfo($pFilename);
@ -262,7 +261,7 @@ class PHPExcel_IOFactory
break; break;
} }
if ($extensionType !== NULL) { if ($extensionType !== null) {
$reader = self::createReader($extensionType); $reader = self::createReader($extensionType);
// Let's see if we are lucky // Let's see if we are lucky
if (isset($reader) && $reader->canRead($pFilename)) { if (isset($reader) && $reader->canRead($pFilename)) {
@ -284,5 +283,5 @@ class PHPExcel_IOFactory
} }
throw new PHPExcel_Reader_Exception('Unable to identify a reader for this file'); throw new PHPExcel_Reader_Exception('Unable to identify a reader for this file');
} // function createReaderForFile() }
} }

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_NamedRange
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_NamedRange
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_NamedRange class PHPExcel_NamedRange
{ {
/** /**

View File

@ -33,7 +33,8 @@
* @package PHPExcel_Reader * @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/ */
class PHPExcel_Reader_Exception extends PHPExcel_Exception { class PHPExcel_Reader_Exception extends PHPExcel_Exception
{
/** /**
* Error handler callback * Error handler callback
* *
@ -43,7 +44,8 @@ class PHPExcel_Reader_Exception extends PHPExcel_Exception {
* @param mixed $line * @param mixed $line
* @param mixed $context * @param mixed $context
*/ */
public static function errorHandlerCallback($code, $string, $file, $line, $context) { public static function errorHandlerCallback($code, $string, $file, $line, $context)
{
$e = new self($string, $code); $e = new self($string, $code);
$e->line = $line; $e->line = $line;
$e->file = $file; $e->file = $file;

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Reader_IReadFilter
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Reader_IReadFilter
*
* @category PHPExcel
* @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
interface PHPExcel_Reader_IReadFilter interface PHPExcel_Reader_IReadFilter
{ {
/** /**

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_ReferenceHelper (Singleton)
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_ReferenceHelper (Singleton)
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_ReferenceHelper class PHPExcel_ReferenceHelper
{ {
/** Constants */ /** Constants */

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Worksheet
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Worksheet
*
* @category PHPExcel
* @package PHPExcel_Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Worksheet implements PHPExcel_IComparable class PHPExcel_Worksheet implements PHPExcel_IComparable
{ {
/* Break types */ /* Break types */

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_Abstract
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Writer_Abstract
*
* @category PHPExcel
* @package PHPExcel_Writer
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
abstract class PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter abstract class PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter
{ {
/** /**
@ -41,7 +33,7 @@ abstract class PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter
* *
* @var boolean * @var boolean
*/ */
protected $_includeCharts = FALSE; protected $_includeCharts = false;
/** /**
* Pre-calculate formulas * Pre-calculate formulas
@ -50,14 +42,14 @@ abstract class PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter
* *
* @var boolean * @var boolean
*/ */
protected $_preCalculateFormulas = TRUE; protected $_preCalculateFormulas = true;
/** /**
* Use disk caching where possible? * Use disk caching where possible?
* *
* @var boolean * @var boolean
*/ */
protected $_useDiskCaching = FALSE; protected $_useDiskCaching = false;
/** /**
* Disk caching directory * Disk caching directory
@ -85,7 +77,8 @@ abstract class PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Writer_IWriter * @return PHPExcel_Writer_IWriter
*/ */
public function setIncludeCharts($pValue = FALSE) { public function setIncludeCharts($pValue = false)
{
$this->_includeCharts = (boolean) $pValue; $this->_includeCharts = (boolean) $pValue;
return $this; return $this;
} }

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_CSV
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,16 +25,8 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
class PHPExcel_Writer_CSV extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter
{
/**
* PHPExcel_Writer_CSV
*
* @category PHPExcel
* @package PHPExcel_Writer_CSV
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Writer_CSV extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter {
/** /**
* PHPExcel object * PHPExcel object
* *
@ -88,7 +81,8 @@ class PHPExcel_Writer_CSV extends PHPExcel_Writer_Abstract implements PHPExcel_W
* *
* @param PHPExcel $phpExcel PHPExcel object * @param PHPExcel $phpExcel PHPExcel object
*/ */
public function __construct(PHPExcel $phpExcel) { public function __construct(PHPExcel $phpExcel)
{
$this->_phpExcel = $phpExcel; $this->_phpExcel = $phpExcel;
} }
@ -98,7 +92,8 @@ class PHPExcel_Writer_CSV extends PHPExcel_Writer_Abstract implements PHPExcel_W
* @param string $pFilename * @param string $pFilename
* @throws PHPExcel_Writer_Exception * @throws PHPExcel_Writer_Exception
*/ */
public function save($pFilename = null) { public function save($pFilename = null)
{
// Fetch sheet // Fetch sheet
$sheet = $this->_phpExcel->getSheet($this->_sheetIndex); $sheet = $this->_phpExcel->getSheet($this->_sheetIndex);

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_Excel2007
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Writer_Excel2007
*
* @category PHPExcel
* @package PHPExcel_Writer_2007
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Writer_Excel2007 extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter class PHPExcel_Writer_Excel2007 extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter
{ {
/** /**
@ -44,7 +36,7 @@ class PHPExcel_Writer_Excel2007 extends PHPExcel_Writer_Abstract implements PHPE
* *
* @var boolean * @var boolean
*/ */
protected $_preCalculateFormulas = FALSE; protected $_preCalculateFormulas = false;
/** /**
* Office2003 compatibility * Office2003 compatibility

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_Excel5
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Writer_Excel5
*
* @category PHPExcel
* @package PHPExcel_Writer_Excel5
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Writer_Excel5 extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter class PHPExcel_Writer_Excel5 extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter
{ {
/** /**

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_Exception
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,16 +25,8 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
class PHPExcel_Writer_Exception extends PHPExcel_Exception
{
/**
* PHPExcel_Writer_Exception
*
* @category PHPExcel
* @package PHPExcel_Writer
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Writer_Exception extends PHPExcel_Exception {
/** /**
* Error handler callback * Error handler callback
* *
@ -43,7 +36,8 @@ class PHPExcel_Writer_Exception extends PHPExcel_Exception {
* @param mixed $line * @param mixed $line
* @param mixed $context * @param mixed $context
*/ */
public static function errorHandlerCallback($code, $string, $file, $line, $context) { public static function errorHandlerCallback($code, $string, $file, $line, $context)
{
$e = new self($string, $code); $e = new self($string, $code);
$e->line = $line; $e->line = $line;
$e->file = $file; $e->file = $file;

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_HTML
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,16 +25,8 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter
{
/**
* PHPExcel_Writer_HTML
*
* @category PHPExcel
* @package PHPExcel_Writer_HTML
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter {
/** /**
* PHPExcel object * PHPExcel object
* *

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_IWriter
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Writer_IWriter
*
* @category PHPExcel
* @package PHPExcel_Writer
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
interface PHPExcel_Writer_IWriter interface PHPExcel_Writer_IWriter
{ {
/** /**
@ -41,6 +33,6 @@ interface PHPExcel_Writer_IWriter
* @param string $pFilename Name of the file to save * @param string $pFilename Name of the file to save
* @throws PHPExcel_Writer_Exception * @throws PHPExcel_Writer_Exception
*/ */
public function save($pFilename = NULL); public function save($pFilename = null);
} }

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_OpenDocument
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,17 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Writer_OpenDocument
*
* @category PHPExcel
* @package PHPExcel_Writer_OpenDocument
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @author Alexander Pervakov <frost-nzcr4@jagmort.com>
* @link http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os.html
*/
class PHPExcel_Writer_OpenDocument extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter class PHPExcel_Writer_OpenDocument extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter
{ {
/** /**
@ -42,14 +32,14 @@ class PHPExcel_Writer_OpenDocument extends PHPExcel_Writer_Abstract implements P
* *
* @var PHPExcel_Writer_OpenDocument_WriterPart[] * @var PHPExcel_Writer_OpenDocument_WriterPart[]
*/ */
private $_writerParts = array(); private $writerParts = array();
/** /**
* Private PHPExcel * Private PHPExcel
* *
* @var PHPExcel * @var PHPExcel
*/ */
private $_spreadSheet; private $spreadSheet;
/** /**
* Create a new PHPExcel_Writer_OpenDocument * Create a new PHPExcel_Writer_OpenDocument
@ -71,7 +61,7 @@ class PHPExcel_Writer_OpenDocument extends PHPExcel_Writer_Abstract implements P
); );
foreach ($writerPartsArray as $writer => $class) { foreach ($writerPartsArray as $writer => $class) {
$this->_writerParts[$writer] = new $class($this); $this->writerParts[$writer] = new $class($this);
} }
} }
@ -83,8 +73,8 @@ class PHPExcel_Writer_OpenDocument extends PHPExcel_Writer_Abstract implements P
*/ */
public function getWriterPart($pPartName = '') public function getWriterPart($pPartName = '')
{ {
if ($pPartName != '' && isset($this->_writerParts[strtolower($pPartName)])) { if ($pPartName != '' && isset($this->writerParts[strtolower($pPartName)])) {
return $this->_writerParts[strtolower($pPartName)]; return $this->writerParts[strtolower($pPartName)];
} else { } else {
return null; return null;
} }
@ -96,14 +86,14 @@ class PHPExcel_Writer_OpenDocument extends PHPExcel_Writer_Abstract implements P
* @param string $pFilename * @param string $pFilename
* @throws PHPExcel_Writer_Exception * @throws PHPExcel_Writer_Exception
*/ */
public function save($pFilename = NULL) public function save($pFilename = null)
{ {
if (!$this->_spreadSheet) { if (!$this->spreadSheet) {
throw new PHPExcel_Writer_Exception('PHPExcel object unassigned.'); throw new PHPExcel_Writer_Exception('PHPExcel object unassigned.');
} }
// garbage collect // garbage collect
$this->_spreadSheet->garbageCollect(); $this->spreadSheet->garbageCollect();
// If $pFilename is php://output or php://stdout, make it a temporary file... // If $pFilename is php://output or php://stdout, make it a temporary file...
$originalFilename = $pFilename; $originalFilename = $pFilename;
@ -114,7 +104,7 @@ class PHPExcel_Writer_OpenDocument extends PHPExcel_Writer_Abstract implements P
} }
} }
$objZip = $this->_createZip($pFilename); $objZip = $this->createZip($pFilename);
$objZip->addFromString('META-INF/manifest.xml', $this->getWriterPart('meta_inf')->writeManifest()); $objZip->addFromString('META-INF/manifest.xml', $this->getWriterPart('meta_inf')->writeManifest());
$objZip->addFromString('Thumbnails/thumbnail.png', $this->getWriterPart('thumbnails')->writeThumbnail()); $objZip->addFromString('Thumbnails/thumbnail.png', $this->getWriterPart('thumbnails')->writeThumbnail());
@ -145,7 +135,7 @@ class PHPExcel_Writer_OpenDocument extends PHPExcel_Writer_Abstract implements P
* @throws PHPExcel_Writer_Exception * @throws PHPExcel_Writer_Exception
* @return ZipArchive * @return ZipArchive
*/ */
private function _createZip($pFilename) private function createZip($pFilename)
{ {
// Create new ZIP file and open it for writing // Create new ZIP file and open it for writing
$zipClass = PHPExcel_Settings::getZipClass(); $zipClass = PHPExcel_Settings::getZipClass();
@ -178,8 +168,8 @@ class PHPExcel_Writer_OpenDocument extends PHPExcel_Writer_Abstract implements P
*/ */
public function getPHPExcel() public function getPHPExcel()
{ {
if ($this->_spreadSheet !== null) { if ($this->spreadSheet !== null) {
return $this->_spreadSheet; return $this->spreadSheet;
} else { } else {
throw new PHPExcel_Writer_Exception('No PHPExcel assigned.'); throw new PHPExcel_Writer_Exception('No PHPExcel assigned.');
} }
@ -194,7 +184,7 @@ class PHPExcel_Writer_OpenDocument extends PHPExcel_Writer_Abstract implements P
*/ */
public function setPHPExcel(PHPExcel $pPHPExcel = null) public function setPHPExcel(PHPExcel $pPHPExcel = null)
{ {
$this->_spreadSheet = $pPHPExcel; $this->spreadSheet = $pPHPExcel;
return $this; return $this;
} }
} }

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_OpenDocument_Meta
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,16 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Writer_OpenDocument_Meta
*
* @category PHPExcel
* @package PHPExcel_Writer_OpenDocument
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @author Alexander Pervakov <frost-nzcr4@jagmort.com>
*/
class PHPExcel_Writer_OpenDocument_Meta extends PHPExcel_Writer_OpenDocument_WriterPart class PHPExcel_Writer_OpenDocument_Meta extends PHPExcel_Writer_OpenDocument_WriterPart
{ {
/** /**
@ -61,6 +52,7 @@ class PHPExcel_Writer_OpenDocument_Meta extends PHPExcel_Writer_OpenDocument_Wri
// Meta // Meta
$objWriter->startElement('office:document-meta'); $objWriter->startElement('office:document-meta');
$objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0');
$objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
$objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/');
@ -70,6 +62,7 @@ class PHPExcel_Writer_OpenDocument_Meta extends PHPExcel_Writer_OpenDocument_Wri
$objWriter->writeAttribute('office:version', '1.2'); $objWriter->writeAttribute('office:version', '1.2');
$objWriter->startElement('office:meta'); $objWriter->startElement('office:meta');
$objWriter->writeElement('meta:initial-creator', $pPHPExcel->getProperties()->getCreator()); $objWriter->writeElement('meta:initial-creator', $pPHPExcel->getProperties()->getCreator());
$objWriter->writeElement('dc:creator', $pPHPExcel->getProperties()->getCreator()); $objWriter->writeElement('dc:creator', $pPHPExcel->getProperties()->getCreator());
$objWriter->writeElement('meta:creation-date', date(DATE_W3C, $pPHPExcel->getProperties()->getCreated())); $objWriter->writeElement('meta:creation-date', date(DATE_W3C, $pPHPExcel->getProperties()->getCreated()));
@ -81,16 +74,20 @@ class PHPExcel_Writer_OpenDocument_Meta extends PHPExcel_Writer_OpenDocument_Wri
foreach ($keywords as $keyword) { foreach ($keywords as $keyword) {
$objWriter->writeElement('meta:keyword', $keyword); $objWriter->writeElement('meta:keyword', $keyword);
} }
//<meta:document-statistic meta:table-count="XXX" meta:cell-count="XXX" meta:object-count="XXX"/> //<meta:document-statistic meta:table-count="XXX" meta:cell-count="XXX" meta:object-count="XXX"/>
$objWriter->startElement('meta:user-defined'); $objWriter->startElement('meta:user-defined');
$objWriter->writeAttribute('meta:name', 'Company'); $objWriter->writeAttribute('meta:name', 'Company');
$objWriter->writeRaw($pPHPExcel->getProperties()->getCompany()); $objWriter->writeRaw($pPHPExcel->getProperties()->getCompany());
$objWriter->endElement(); $objWriter->endElement();
$objWriter->startElement('meta:user-defined'); $objWriter->startElement('meta:user-defined');
$objWriter->writeAttribute('meta:name', 'category'); $objWriter->writeAttribute('meta:name', 'category');
$objWriter->writeRaw($pPHPExcel->getProperties()->getCategory()); $objWriter->writeRaw($pPHPExcel->getProperties()->getCategory());
$objWriter->endElement(); $objWriter->endElement();
$objWriter->endElement(); $objWriter->endElement();
$objWriter->endElement(); $objWriter->endElement();
return $objWriter->getData(); return $objWriter->getData();

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_OpenDocument_MetaInf
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,16 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Writer_OpenDocument_MetaInf
*
* @category PHPExcel
* @package PHPExcel_Writer_OpenDocument
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @author Alexander Pervakov <frost-nzcr4@jagmort.com>
*/
class PHPExcel_Writer_OpenDocument_MetaInf extends PHPExcel_Writer_OpenDocument_WriterPart class PHPExcel_Writer_OpenDocument_MetaInf extends PHPExcel_Writer_OpenDocument_WriterPart
{ {
/** /**

View File

@ -1,8 +1,9 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel
* *
* Copyright (c) 2006 - 2015 PHPExcel * PHPExcel_Writer_OpenDocument_Mimetype
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -24,16 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Writer_OpenDocument_Mimetype
*
* @category PHPExcel
* @package PHPExcel_Writer_OpenDocument
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @author Alexander Pervakov <frost-nzcr4@jagmort.com>
*/
class PHPExcel_Writer_OpenDocument_Mimetype extends PHPExcel_Writer_OpenDocument_WriterPart class PHPExcel_Writer_OpenDocument_Mimetype extends PHPExcel_Writer_OpenDocument_WriterPart
{ {
/** /**

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_OpenDocument_Settings
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,16 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Writer_OpenDocument_Settings
*
* @category PHPExcel
* @package PHPExcel_Writer_OpenDocument
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @author Alexander Pervakov <frost-nzcr4@jagmort.com>
*/
class PHPExcel_Writer_OpenDocument_Settings extends PHPExcel_Writer_OpenDocument_WriterPart class PHPExcel_Writer_OpenDocument_Settings extends PHPExcel_Writer_OpenDocument_WriterPart
{ {
/** /**

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_OpenDocument_Styles
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,16 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Writer_OpenDocument_Styles
*
* @category PHPExcel
* @package PHPExcel_Writer_OpenDocument
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @author Alexander Pervakov <frost-nzcr4@jagmort.com>
*/
class PHPExcel_Writer_OpenDocument_Styles extends PHPExcel_Writer_OpenDocument_WriterPart class PHPExcel_Writer_OpenDocument_Styles extends PHPExcel_Writer_OpenDocument_WriterPart
{ {
/** /**

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_OpenDocument_Thumbnails
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,16 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Writer_OpenDocument_Thumbnails
*
* @category PHPExcel
* @package PHPExcel_Writer_OpenDocument
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @author Alexander Pervakov <frost-nzcr4@jagmort.com>
*/
class PHPExcel_Writer_OpenDocument_Thumbnails extends PHPExcel_Writer_OpenDocument_WriterPart class PHPExcel_Writer_OpenDocument_Thumbnails extends PHPExcel_Writer_OpenDocument_WriterPart
{ {
/** /**

View File

@ -1,6 +1,7 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel_Writer_OpenDocument_WriterPart
* *
* Copyright (c) 2006 - 2015 PHPExcel * Copyright (c) 2006 - 2015 PHPExcel
* *
@ -24,15 +25,6 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
/**
* PHPExcel_Writer_OpenDocument_WriterPart
*
* @category PHPExcel
* @package PHPExcel_Writer_OpenDocument
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
abstract class PHPExcel_Writer_OpenDocument_WriterPart extends PHPExcel_Writer_Excel2007_WriterPart abstract class PHPExcel_Writer_OpenDocument_WriterPart extends PHPExcel_Writer_Excel2007_WriterPart
{ {
} }