Validation PSR-2 : Fixes

This commit is contained in:
Progi1984 2015-05-12 13:17:41 +02:00
parent 95b3fb024a
commit 661ff77749
5 changed files with 1544 additions and 870 deletions

View File

@ -166,7 +166,8 @@ class PHPExcel_Chart_DataSeries
* *
* @return string * @return string
*/ */
public function getPlotType() { public function getPlotType()
{
return $this->_plotType; return $this->_plotType;
} }
@ -176,7 +177,8 @@ class PHPExcel_Chart_DataSeries
* @param string $plotType * @param string $plotType
* @return PHPExcel_Chart_DataSeries * @return PHPExcel_Chart_DataSeries
*/ */
public function setPlotType($plotType = '') { public function setPlotType($plotType = '')
{
$this->_plotType = $plotType; $this->_plotType = $plotType;
return $this; return $this;
} }
@ -186,7 +188,8 @@ class PHPExcel_Chart_DataSeries
* *
* @return string * @return string
*/ */
public function getPlotGrouping() { public function getPlotGrouping()
{
return $this->_plotGrouping; return $this->_plotGrouping;
} }
@ -196,7 +199,8 @@ class PHPExcel_Chart_DataSeries
* @param string $groupingType * @param string $groupingType
* @return PHPExcel_Chart_DataSeries * @return PHPExcel_Chart_DataSeries
*/ */
public function setPlotGrouping($groupingType = null) { public function setPlotGrouping($groupingType = null)
{
$this->_plotGrouping = $groupingType; $this->_plotGrouping = $groupingType;
return $this; return $this;
} }
@ -206,7 +210,8 @@ class PHPExcel_Chart_DataSeries
* *
* @return string * @return string
*/ */
public function getPlotDirection() { public function getPlotDirection()
{
return $this->_plotDirection; return $this->_plotDirection;
} }
@ -216,7 +221,8 @@ class PHPExcel_Chart_DataSeries
* @param string $plotDirection * @param string $plotDirection
* @return PHPExcel_Chart_DataSeries * @return PHPExcel_Chart_DataSeries
*/ */
public function setPlotDirection($plotDirection = null) { public function setPlotDirection($plotDirection = null)
{
$this->_plotDirection = $plotDirection; $this->_plotDirection = $plotDirection;
return $this; return $this;
} }
@ -226,7 +232,8 @@ class PHPExcel_Chart_DataSeries
* *
* @return string * @return string
*/ */
public function getPlotOrder() { public function getPlotOrder()
{
return $this->_plotOrder; return $this->_plotOrder;
} }
@ -235,7 +242,8 @@ class PHPExcel_Chart_DataSeries
* *
* @return array of PHPExcel_Chart_DataSeriesValues * @return array of PHPExcel_Chart_DataSeriesValues
*/ */
public function getPlotLabels() { public function getPlotLabels()
{
return $this->_plotLabel; return $this->_plotLabel;
} }
@ -244,11 +252,12 @@ class PHPExcel_Chart_DataSeries
* *
* @return PHPExcel_Chart_DataSeriesValues * @return PHPExcel_Chart_DataSeriesValues
*/ */
public function getPlotLabelByIndex($index) { public function getPlotLabelByIndex($index)
{
$keys = array_keys($this->_plotLabel); $keys = array_keys($this->_plotLabel);
if (in_array($index,$keys)) { if (in_array($index, $keys)) {
return $this->_plotLabel[$index]; return $this->_plotLabel[$index];
} elseif(isset($keys[$index])) { } elseif (isset($keys[$index])) {
return $this->_plotLabel[$keys[$index]]; return $this->_plotLabel[$keys[$index]];
} }
return false; return false;
@ -259,7 +268,8 @@ class PHPExcel_Chart_DataSeries
* *
* @return array of PHPExcel_Chart_DataSeriesValues * @return array of PHPExcel_Chart_DataSeriesValues
*/ */
public function getPlotCategories() { public function getPlotCategories()
{
return $this->_plotCategory; return $this->_plotCategory;
} }
@ -268,11 +278,12 @@ class PHPExcel_Chart_DataSeries
* *
* @return PHPExcel_Chart_DataSeriesValues * @return PHPExcel_Chart_DataSeriesValues
*/ */
public function getPlotCategoryByIndex($index) { public function getPlotCategoryByIndex($index)
{
$keys = array_keys($this->_plotCategory); $keys = array_keys($this->_plotCategory);
if (in_array($index,$keys)) { if (in_array($index, $keys)) {
return $this->_plotCategory[$index]; return $this->_plotCategory[$index];
} elseif(isset($keys[$index])) { } elseif (isset($keys[$index])) {
return $this->_plotCategory[$keys[$index]]; return $this->_plotCategory[$keys[$index]];
} }
return false; return false;
@ -283,7 +294,8 @@ class PHPExcel_Chart_DataSeries
* *
* @return string * @return string
*/ */
public function getPlotStyle() { public function getPlotStyle()
{
return $this->_plotStyle; return $this->_plotStyle;
} }
@ -293,7 +305,8 @@ class PHPExcel_Chart_DataSeries
* @param string $plotStyle * @param string $plotStyle
* @return PHPExcel_Chart_DataSeries * @return PHPExcel_Chart_DataSeries
*/ */
public function setPlotStyle($plotStyle = null) { public function setPlotStyle($plotStyle = null)
{
$this->_plotStyle = $plotStyle; $this->_plotStyle = $plotStyle;
return $this; return $this;
} }
@ -303,7 +316,8 @@ class PHPExcel_Chart_DataSeries
* *
* @return array of PHPExcel_Chart_DataSeriesValues * @return array of PHPExcel_Chart_DataSeriesValues
*/ */
public function getPlotValues() { public function getPlotValues()
{
return $this->_plotValues; return $this->_plotValues;
} }
@ -312,11 +326,12 @@ class PHPExcel_Chart_DataSeries
* *
* @return PHPExcel_Chart_DataSeriesValues * @return PHPExcel_Chart_DataSeriesValues
*/ */
public function getPlotValuesByIndex($index) { public function getPlotValuesByIndex($index)
{
$keys = array_keys($this->_plotValues); $keys = array_keys($this->_plotValues);
if (in_array($index,$keys)) { if (in_array($index, $keys)) {
return $this->_plotValues[$index]; return $this->_plotValues[$index];
} elseif(isset($keys[$index])) { } elseif (isset($keys[$index])) {
return $this->_plotValues[$keys[$index]]; return $this->_plotValues[$keys[$index]];
} }
return false; return false;
@ -327,7 +342,8 @@ class PHPExcel_Chart_DataSeries
* *
* @return integer * @return integer
*/ */
public function getPlotSeriesCount() { public function getPlotSeriesCount()
{
return count($this->_plotValues); return count($this->_plotValues);
} }
@ -336,7 +352,8 @@ class PHPExcel_Chart_DataSeries
* *
* @return boolean * @return boolean
*/ */
public function getSmoothLine() { public function getSmoothLine()
{
return $this->_smoothLine; return $this->_smoothLine;
} }
@ -346,23 +363,28 @@ class PHPExcel_Chart_DataSeries
* @param boolean $smoothLine * @param boolean $smoothLine
* @return PHPExcel_Chart_DataSeries * @return PHPExcel_Chart_DataSeries
*/ */
public function setSmoothLine($smoothLine = TRUE) { public function setSmoothLine($smoothLine = true)
{
$this->_smoothLine = $smoothLine; $this->_smoothLine = $smoothLine;
return $this; return $this;
} }
public function refresh(PHPExcel_Worksheet $worksheet) { public function refresh(PHPExcel_Worksheet $worksheet)
{
foreach($this->_plotValues as $plotValues) { foreach($this->_plotValues as $plotValues) {
if ($plotValues !== NULL) if ($plotValues !== null) {
$plotValues->refresh($worksheet, TRUE); $plotValues->refresh($worksheet, true);
}
} }
foreach($this->_plotLabel as $plotValues) { foreach($this->_plotLabel as $plotValues) {
if ($plotValues !== NULL) if ($plotValues !== null) {
$plotValues->refresh($worksheet, TRUE); $plotValues->refresh($worksheet, true);
}
} }
foreach($this->_plotCategory as $plotValues) { foreach($this->_plotCategory as $plotValues) {
if ($plotValues !== NULL) if ($plotValues !== null) {
$plotValues->refresh($worksheet, FALSE); $plotValues->refresh($worksheet, false);
}
} }
} }

View File

@ -40,49 +40,49 @@ class PHPExcel_Chart_Layout
* *
* @var string * @var string
*/ */
private $_layoutTarget = NULL; private $_layoutTarget = null;
/** /**
* X Mode * X Mode
* *
* @var string * @var string
*/ */
private $_xMode = NULL; private $_xMode = null;
/** /**
* Y Mode * Y Mode
* *
* @var string * @var string
*/ */
private $_yMode = NULL; private $_yMode = null;
/** /**
* X-Position * X-Position
* *
* @var float * @var float
*/ */
private $_xPos = NULL; private $_xPos = null;
/** /**
* Y-Position * Y-Position
* *
* @var float * @var float
*/ */
private $_yPos = NULL; private $_yPos = null;
/** /**
* width * width
* *
* @var float * @var float
*/ */
private $_width = NULL; private $_width = null;
/** /**
* height * height
* *
* @var float * @var float
*/ */
private $_height = NULL; private $_height = null;
/** /**
* show legend key * show legend key
@ -90,7 +90,7 @@ class PHPExcel_Chart_Layout
* *
* @var boolean * @var boolean
*/ */
private $_showLegendKey = NULL; private $_showLegendKey = null;
/** /**
* show value * show value
@ -98,7 +98,7 @@ class PHPExcel_Chart_Layout
* *
* @var boolean * @var boolean
*/ */
private $_showVal = NULL; private $_showVal = null;
/** /**
* show category name * show category name
@ -106,7 +106,7 @@ class PHPExcel_Chart_Layout
* *
* @var boolean * @var boolean
*/ */
private $_showCatName = NULL; private $_showCatName = null;
/** /**
* show data series name * show data series name
@ -114,7 +114,7 @@ class PHPExcel_Chart_Layout
* *
* @var boolean * @var boolean
*/ */
private $_showSerName = NULL; private $_showSerName = null;
/** /**
* show percentage * show percentage
@ -122,14 +122,14 @@ class PHPExcel_Chart_Layout
* *
* @var boolean * @var boolean
*/ */
private $_showPercent = NULL; private $_showPercent = null;
/** /**
* show bubble size * show bubble size
* *
* @var boolean * @var boolean
*/ */
private $_showBubbleSize = NULL; private $_showBubbleSize = null;
/** /**
* show leader lines * show leader lines
@ -137,21 +137,35 @@ class PHPExcel_Chart_Layout
* *
* @var boolean * @var boolean
*/ */
private $_showLeaderLines = NULL; private $_showLeaderLines = null;
/** /**
* Create a new PHPExcel_Chart_Layout * Create a new PHPExcel_Chart_Layout
*/ */
public function __construct($layout=array()) public function __construct($layout = array())
{ {
if (isset($layout['layoutTarget'])) { $this->_layoutTarget = $layout['layoutTarget']; } if (isset($layout['layoutTarget'])) {
if (isset($layout['xMode'])) { $this->_xMode = $layout['xMode']; } $this->_layoutTarget = $layout['layoutTarget'];
if (isset($layout['yMode'])) { $this->_yMode = $layout['yMode']; } }
if (isset($layout['x'])) { $this->_xPos = (float) $layout['x']; } if (isset($layout['xMode'])) {
if (isset($layout['y'])) { $this->_yPos = (float) $layout['y']; } $this->_xMode = $layout['xMode'];
if (isset($layout['w'])) { $this->_width = (float) $layout['w']; } }
if (isset($layout['h'])) { $this->_height = (float) $layout['h']; } if (isset($layout['yMode'])) {
$this->_yMode = $layout['yMode'];
}
if (isset($layout['x'])) {
$this->_xPos = (float) $layout['x'];
}
if (isset($layout['y'])) {
$this->_yPos = (float) $layout['y'];
}
if (isset($layout['w'])) {
$this->_width = (float) $layout['w'];
}
if (isset($layout['h'])) {
$this->_height = (float) $layout['h'];
}
} }
/** /**
@ -159,7 +173,8 @@ class PHPExcel_Chart_Layout
* *
* @return string * @return string
*/ */
public function getLayoutTarget() { public function getLayoutTarget()
{
return $this->_layoutTarget; return $this->_layoutTarget;
} }
@ -169,7 +184,8 @@ class PHPExcel_Chart_Layout
* @param Layout Target $value * @param Layout Target $value
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setLayoutTarget($value) { public function setLayoutTarget($value)
{
$this->_layoutTarget = $value; $this->_layoutTarget = $value;
return $this; return $this;
} }
@ -179,7 +195,8 @@ class PHPExcel_Chart_Layout
* *
* @return string * @return string
*/ */
public function getXMode() { public function getXMode()
{
return $this->_xMode; return $this->_xMode;
} }
@ -189,7 +206,8 @@ class PHPExcel_Chart_Layout
* @param X-Mode $value * @param X-Mode $value
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setXMode($value) { public function setXMode($value)
{
$this->_xMode = $value; $this->_xMode = $value;
return $this; return $this;
} }
@ -199,7 +217,8 @@ class PHPExcel_Chart_Layout
* *
* @return string * @return string
*/ */
public function getYMode() { public function getYMode()
{
return $this->_yMode; return $this->_yMode;
} }
@ -209,7 +228,8 @@ class PHPExcel_Chart_Layout
* @param Y-Mode $value * @param Y-Mode $value
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setYMode($value) { public function setYMode($value)
{
$this->_yMode = $value; $this->_yMode = $value;
return $this; return $this;
} }
@ -219,7 +239,8 @@ class PHPExcel_Chart_Layout
* *
* @return number * @return number
*/ */
public function getXPosition() { public function getXPosition()
{
return $this->_xPos; return $this->_xPos;
} }
@ -229,7 +250,8 @@ class PHPExcel_Chart_Layout
* @param X-Position $value * @param X-Position $value
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setXPosition($value) { public function setXPosition($value)
{
$this->_xPos = $value; $this->_xPos = $value;
return $this; return $this;
} }
@ -239,7 +261,8 @@ class PHPExcel_Chart_Layout
* *
* @return number * @return number
*/ */
public function getYPosition() { public function getYPosition()
{
return $this->_yPos; return $this->_yPos;
} }
@ -249,7 +272,8 @@ class PHPExcel_Chart_Layout
* @param Y-Position $value * @param Y-Position $value
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setYPosition($value) { public function setYPosition($value)
{
$this->_yPos = $value; $this->_yPos = $value;
return $this; return $this;
} }
@ -259,7 +283,8 @@ class PHPExcel_Chart_Layout
* *
* @return number * @return number
*/ */
public function getWidth() { public function getWidth()
{
return $this->_width; return $this->_width;
} }
@ -269,7 +294,8 @@ class PHPExcel_Chart_Layout
* @param Width $value * @param Width $value
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setWidth($value) { public function setWidth($value)
{
$this->_width = $value; $this->_width = $value;
return $this; return $this;
} }
@ -279,7 +305,8 @@ class PHPExcel_Chart_Layout
* *
* @return number * @return number
*/ */
public function getHeight() { public function getHeight()
{
return $this->_height; return $this->_height;
} }
@ -289,7 +316,8 @@ class PHPExcel_Chart_Layout
* @param Height $value * @param Height $value
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setHeight($value) { public function setHeight($value)
{
$this->_height = $value; $this->_height = $value;
return $this; return $this;
} }
@ -300,7 +328,8 @@ class PHPExcel_Chart_Layout
* *
* @return boolean * @return boolean
*/ */
public function getShowLegendKey() { public function getShowLegendKey()
{
return $this->_showLegendKey; return $this->_showLegendKey;
} }
@ -311,7 +340,8 @@ class PHPExcel_Chart_Layout
* @param boolean $value Show legend key * @param boolean $value Show legend key
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setShowLegendKey($value) { public function setShowLegendKey($value)
{
$this->_showLegendKey = $value; $this->_showLegendKey = $value;
return $this; return $this;
} }
@ -321,7 +351,8 @@ class PHPExcel_Chart_Layout
* *
* @return boolean * @return boolean
*/ */
public function getShowVal() { public function getShowVal()
{
return $this->_showVal; return $this->_showVal;
} }
@ -332,7 +363,8 @@ class PHPExcel_Chart_Layout
* @param boolean $value Show val * @param boolean $value Show val
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setShowVal($value) { public function setShowVal($value)
{
$this->_showVal = $value; $this->_showVal = $value;
return $this; return $this;
} }
@ -342,7 +374,8 @@ class PHPExcel_Chart_Layout
* *
* @return boolean * @return boolean
*/ */
public function getShowCatName() { public function getShowCatName()
{
return $this->_showCatName; return $this->_showCatName;
} }
@ -353,7 +386,8 @@ class PHPExcel_Chart_Layout
* @param boolean $value Show cat name * @param boolean $value Show cat name
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setShowCatName($value) { public function setShowCatName($value)
{
$this->_showCatName = $value; $this->_showCatName = $value;
return $this; return $this;
} }
@ -363,7 +397,8 @@ class PHPExcel_Chart_Layout
* *
* @return boolean * @return boolean
*/ */
public function getShowSerName() { public function getShowSerName()
{
return $this->_showSerName; return $this->_showSerName;
} }
@ -374,7 +409,8 @@ class PHPExcel_Chart_Layout
* @param boolean $value Show series name * @param boolean $value Show series name
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setShowSerName($value) { public function setShowSerName($value)
{
$this->_showSerName = $value; $this->_showSerName = $value;
return $this; return $this;
} }
@ -384,7 +420,8 @@ class PHPExcel_Chart_Layout
* *
* @return boolean * @return boolean
*/ */
public function getShowPercent() { public function getShowPercent()
{
return $this->_showPercent; return $this->_showPercent;
} }
@ -395,7 +432,8 @@ class PHPExcel_Chart_Layout
* @param boolean $value Show percentage * @param boolean $value Show percentage
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setShowPercent($value) { public function setShowPercent($value)
{
$this->_showPercent = $value; $this->_showPercent = $value;
return $this; return $this;
} }
@ -405,7 +443,8 @@ class PHPExcel_Chart_Layout
* *
* @return boolean * @return boolean
*/ */
public function getShowBubbleSize() { public function getShowBubbleSize()
{
return $this->_showBubbleSize; return $this->_showBubbleSize;
} }
@ -416,7 +455,8 @@ class PHPExcel_Chart_Layout
* @param boolean $value Show bubble size * @param boolean $value Show bubble size
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setShowBubbleSize($value) { public function setShowBubbleSize($value)
{
$this->_showBubbleSize = $value; $this->_showBubbleSize = $value;
return $this; return $this;
} }
@ -426,7 +466,8 @@ class PHPExcel_Chart_Layout
* *
* @return boolean * @return boolean
*/ */
public function getShowLeaderLines() { public function getShowLeaderLines()
{
return $this->_showLeaderLines; return $this->_showLeaderLines;
} }
@ -437,9 +478,9 @@ class PHPExcel_Chart_Layout
* @param boolean $value Show leader lines * @param boolean $value Show leader lines
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function setShowLeaderLines($value) { public function setShowLeaderLines($value)
{
$this->_showLeaderLines = $value; $this->_showLeaderLines = $value;
return $this; return $this;
} }
} }

View File

@ -55,7 +55,8 @@ class PHPExcel_Chart_PlotArea
* *
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function getLayout() { public function getLayout()
{
return $this->_layout; return $this->_layout;
} }
@ -64,7 +65,8 @@ class PHPExcel_Chart_PlotArea
* *
* @return array of PHPExcel_Chart_DataSeries * @return array of PHPExcel_Chart_DataSeries
*/ */
public function getPlotGroupCount() { public function getPlotGroupCount()
{
return count($this->_plotSeries); return count($this->_plotSeries);
} }
@ -73,9 +75,10 @@ class PHPExcel_Chart_PlotArea
* *
* @return integer * @return integer
*/ */
public function getPlotSeriesCount() { public function getPlotSeriesCount()
{
$seriesCount = 0; $seriesCount = 0;
foreach($this->_plotSeries as $plot) { foreach ($this->_plotSeries as $plot) {
$seriesCount += $plot->getPlotSeriesCount(); $seriesCount += $plot->getPlotSeriesCount();
} }
return $seriesCount; return $seriesCount;
@ -86,7 +89,8 @@ class PHPExcel_Chart_PlotArea
* *
* @return array of PHPExcel_Chart_DataSeries * @return array of PHPExcel_Chart_DataSeries
*/ */
public function getPlotGroup() { public function getPlotGroup()
{
return $this->_plotSeries; return $this->_plotSeries;
} }
@ -95,7 +99,8 @@ class PHPExcel_Chart_PlotArea
* *
* @return PHPExcel_Chart_DataSeries * @return PHPExcel_Chart_DataSeries
*/ */
public function getPlotGroupByIndex($index) { public function getPlotGroupByIndex($index)
{
return $this->_plotSeries[$index]; return $this->_plotSeries[$index];
} }
@ -105,16 +110,17 @@ class PHPExcel_Chart_PlotArea
* @param [PHPExcel_Chart_DataSeries] * @param [PHPExcel_Chart_DataSeries]
* @return PHPExcel_Chart_PlotArea * @return PHPExcel_Chart_PlotArea
*/ */
public function setPlotSeries($plotSeries = array()) { public function setPlotSeries($plotSeries = array())
{
$this->_plotSeries = $plotSeries; $this->_plotSeries = $plotSeries;
return $this; return $this;
} }
public function refresh(PHPExcel_Worksheet $worksheet) { public function refresh(PHPExcel_Worksheet $worksheet)
foreach($this->_plotSeries as $plotSeries) { {
foreach ($this->_plotSeries as $plotSeries) {
$plotSeries->refresh($worksheet); $plotSeries->refresh($worksheet);
} }
} }
} }

View File

@ -8,353 +8,353 @@
abstract class PHPExcel_Chart_Properties abstract class PHPExcel_Chart_Properties
{ {
const
EXCEL_COLOR_TYPE_STANDARD = 'prstClr',
EXCEL_COLOR_TYPE_SCHEME = 'schemeClr',
EXCEL_COLOR_TYPE_ARGB = 'srgbClr';
const const
EXCEL_COLOR_TYPE_STANDARD = 'prstClr', AXIS_LABELS_LOW = 'low',
EXCEL_COLOR_TYPE_SCHEME = 'schemeClr', AXIS_LABELS_HIGH = 'high',
EXCEL_COLOR_TYPE_ARGB = 'srgbClr'; AXIS_LABELS_NEXT_TO = 'nextTo',
AXIS_LABELS_NONE = 'none';
const const
AXIS_LABELS_LOW = 'low', TICK_MARK_NONE = 'none',
AXIS_LABELS_HIGH = 'high', TICK_MARK_INSIDE = 'in',
AXIS_LABELS_NEXT_TO = 'nextTo', TICK_MARK_OUTSIDE = 'out',
AXIS_LABELS_NONE = 'none'; TICK_MARK_CROSS = 'cross';
const const
TICK_MARK_NONE = 'none', HORIZONTAL_CROSSES_AUTOZERO = 'autoZero',
TICK_MARK_INSIDE = 'in', HORIZONTAL_CROSSES_MAXIMUM = 'max';
TICK_MARK_OUTSIDE = 'out',
TICK_MARK_CROSS = 'cross';
const const
HORIZONTAL_CROSSES_AUTOZERO = 'autoZero', FORMAT_CODE_GENERAL = 'General',
HORIZONTAL_CROSSES_MAXIMUM = 'max'; FORMAT_CODE_NUMBER = '#,##0.00',
FORMAT_CODE_CURRENCY = '$#,##0.00',
FORMAT_CODE_ACCOUNTING = '_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)',
FORMAT_CODE_DATE = 'm/d/yyyy',
FORMAT_CODE_TIME = '[$-F400]h:mm:ss AM/PM',
FORMAT_CODE_PERCENTAGE = '0.00%',
FORMAT_CODE_FRACTION = '# ?/?',
FORMAT_CODE_SCIENTIFIC = '0.00E+00',
FORMAT_CODE_TEXT = '@',
FORMAT_CODE_SPECIAL = '00000';
const const
FORMAT_CODE_GENERAL = 'General', ORIENTATION_NORMAL = 'minMax',
FORMAT_CODE_NUMBER = '#,##0.00', ORIENTATION_REVERSED = 'maxMin';
FORMAT_CODE_CURRENCY = '$#,##0.00',
FORMAT_CODE_ACCOUNTING = '_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)',
FORMAT_CODE_DATE = 'm/d/yyyy',
FORMAT_CODE_TIME = '[$-F400]h:mm:ss AM/PM',
FORMAT_CODE_PERCENTAGE = '0.00%',
FORMAT_CODE_FRACTION = '# ?/?',
FORMAT_CODE_SCIENTIFIC = '0.00E+00',
FORMAT_CODE_TEXT = '@',
FORMAT_CODE_SPECIAL = '00000';
const const
ORIENTATION_NORMAL = 'minMax', LINE_STYLE_COMPOUND_SIMPLE = 'sng',
ORIENTATION_REVERSED = 'maxMin'; LINE_STYLE_COMPOUND_DOUBLE = 'dbl',
LINE_STYLE_COMPOUND_THICKTHIN = 'thickThin',
LINE_STYLE_COMPOUND_THINTHICK = 'thinThick',
LINE_STYLE_COMPOUND_TRIPLE = 'tri',
const LINE_STYLE_DASH_SOLID = 'solid',
LINE_STYLE_COMPOUND_SIMPLE = 'sng', LINE_STYLE_DASH_ROUND_DOT = 'sysDot',
LINE_STYLE_COMPOUND_DOUBLE = 'dbl', LINE_STYLE_DASH_SQUERE_DOT = 'sysDash',
LINE_STYLE_COMPOUND_THICKTHIN = 'thickThin', LINE_STYPE_DASH_DASH = 'dash',
LINE_STYLE_COMPOUND_THINTHICK = 'thinThick', LINE_STYLE_DASH_DASH_DOT = 'dashDot',
LINE_STYLE_COMPOUND_TRIPLE = 'tri', LINE_STYLE_DASH_LONG_DASH = 'lgDash',
LINE_STYLE_DASH_LONG_DASH_DOT = 'lgDashDot',
LINE_STYLE_DASH_LONG_DASH_DOT_DOT = 'lgDashDotDot',
LINE_STYLE_DASH_SOLID = 'solid', LINE_STYLE_CAP_SQUARE = 'sq',
LINE_STYLE_DASH_ROUND_DOT = 'sysDot', LINE_STYLE_CAP_ROUND = 'rnd',
LINE_STYLE_DASH_SQUERE_DOT = 'sysDash', LINE_STYLE_CAP_FLAT = 'flat',
LINE_STYPE_DASH_DASH = 'dash',
LINE_STYLE_DASH_DASH_DOT = 'dashDot',
LINE_STYLE_DASH_LONG_DASH = 'lgDash',
LINE_STYLE_DASH_LONG_DASH_DOT = 'lgDashDot',
LINE_STYLE_DASH_LONG_DASH_DOT_DOT = 'lgDashDotDot',
LINE_STYLE_CAP_SQUARE = 'sq', LINE_STYLE_JOIN_ROUND = 'bevel',
LINE_STYLE_CAP_ROUND = 'rnd', LINE_STYLE_JOIN_MITER = 'miter',
LINE_STYLE_CAP_FLAT = 'flat', LINE_STYLE_JOIN_BEVEL = 'bevel',
LINE_STYLE_JOIN_ROUND = 'bevel', LINE_STYLE_ARROW_TYPE_NOARROW = NULL,
LINE_STYLE_JOIN_MITER = 'miter', LINE_STYLE_ARROW_TYPE_ARROW = 'triangle',
LINE_STYLE_JOIN_BEVEL = 'bevel', LINE_STYLE_ARROW_TYPE_OPEN = 'arrow',
LINE_STYLE_ARROW_TYPE_STEALTH = 'stealth',
LINE_STYLE_ARROW_TYPE_DIAMOND = 'diamond',
LINE_STYLE_ARROW_TYPE_OVAL = 'oval',
LINE_STYLE_ARROW_TYPE_NOARROW = NULL, LINE_STYLE_ARROW_SIZE_1 = 1,
LINE_STYLE_ARROW_TYPE_ARROW = 'triangle', LINE_STYLE_ARROW_SIZE_2 = 2,
LINE_STYLE_ARROW_TYPE_OPEN = 'arrow', LINE_STYLE_ARROW_SIZE_3 = 3,
LINE_STYLE_ARROW_TYPE_STEALTH = 'stealth', LINE_STYLE_ARROW_SIZE_4 = 4,
LINE_STYLE_ARROW_TYPE_DIAMOND = 'diamond', LINE_STYLE_ARROW_SIZE_5 = 5,
LINE_STYLE_ARROW_TYPE_OVAL = 'oval', LINE_STYLE_ARROW_SIZE_6 = 6,
LINE_STYLE_ARROW_SIZE_7 = 7,
LINE_STYLE_ARROW_SIZE_8 = 8,
LINE_STYLE_ARROW_SIZE_9 = 9;
LINE_STYLE_ARROW_SIZE_1 = 1, const
LINE_STYLE_ARROW_SIZE_2 = 2, SHADOW_PRESETS_NOSHADOW = NULL,
LINE_STYLE_ARROW_SIZE_3 = 3, SHADOW_PRESETS_OUTER_BOTTTOM_RIGHT = 1,
LINE_STYLE_ARROW_SIZE_4 = 4, SHADOW_PRESETS_OUTER_BOTTOM = 2,
LINE_STYLE_ARROW_SIZE_5 = 5, SHADOW_PRESETS_OUTER_BOTTOM_LEFT = 3,
LINE_STYLE_ARROW_SIZE_6 = 6, SHADOW_PRESETS_OUTER_RIGHT = 4,
LINE_STYLE_ARROW_SIZE_7 = 7, SHADOW_PRESETS_OUTER_CENTER = 5,
LINE_STYLE_ARROW_SIZE_8 = 8, SHADOW_PRESETS_OUTER_LEFT = 6,
LINE_STYLE_ARROW_SIZE_9 = 9; SHADOW_PRESETS_OUTER_TOP_RIGHT = 7,
SHADOW_PRESETS_OUTER_TOP = 8,
SHADOW_PRESETS_OUTER_TOP_LEFT = 9,
SHADOW_PRESETS_INNER_BOTTTOM_RIGHT = 10,
SHADOW_PRESETS_INNER_BOTTOM = 11,
SHADOW_PRESETS_INNER_BOTTOM_LEFT = 12,
SHADOW_PRESETS_INNER_RIGHT = 13,
SHADOW_PRESETS_INNER_CENTER = 14,
SHADOW_PRESETS_INNER_LEFT = 15,
SHADOW_PRESETS_INNER_TOP_RIGHT = 16,
SHADOW_PRESETS_INNER_TOP = 17,
SHADOW_PRESETS_INNER_TOP_LEFT = 18,
SHADOW_PRESETS_PERSPECTIVE_BELOW = 19,
SHADOW_PRESETS_PERSPECTIVE_UPPER_RIGHT = 20,
SHADOW_PRESETS_PERSPECTIVE_UPPER_LEFT = 21,
SHADOW_PRESETS_PERSPECTIVE_LOWER_RIGHT = 22,
SHADOW_PRESETS_PERSPECTIVE_LOWER_LEFT = 23;
const protected function getExcelPointsWidth($width)
SHADOW_PRESETS_NOSHADOW = NULL, {
SHADOW_PRESETS_OUTER_BOTTTOM_RIGHT = 1, return $width * 12700;
SHADOW_PRESETS_OUTER_BOTTOM = 2,
SHADOW_PRESETS_OUTER_BOTTOM_LEFT = 3,
SHADOW_PRESETS_OUTER_RIGHT = 4,
SHADOW_PRESETS_OUTER_CENTER = 5,
SHADOW_PRESETS_OUTER_LEFT = 6,
SHADOW_PRESETS_OUTER_TOP_RIGHT = 7,
SHADOW_PRESETS_OUTER_TOP = 8,
SHADOW_PRESETS_OUTER_TOP_LEFT = 9,
SHADOW_PRESETS_INNER_BOTTTOM_RIGHT = 10,
SHADOW_PRESETS_INNER_BOTTOM = 11,
SHADOW_PRESETS_INNER_BOTTOM_LEFT = 12,
SHADOW_PRESETS_INNER_RIGHT = 13,
SHADOW_PRESETS_INNER_CENTER = 14,
SHADOW_PRESETS_INNER_LEFT = 15,
SHADOW_PRESETS_INNER_TOP_RIGHT = 16,
SHADOW_PRESETS_INNER_TOP = 17,
SHADOW_PRESETS_INNER_TOP_LEFT = 18,
SHADOW_PRESETS_PERSPECTIVE_BELOW = 19,
SHADOW_PRESETS_PERSPECTIVE_UPPER_RIGHT = 20,
SHADOW_PRESETS_PERSPECTIVE_UPPER_LEFT = 21,
SHADOW_PRESETS_PERSPECTIVE_LOWER_RIGHT = 22,
SHADOW_PRESETS_PERSPECTIVE_LOWER_LEFT = 23;
protected function getExcelPointsWidth($width) {
return $width * 12700;
}
protected function getExcelPointsAngle($angle) {
return $angle * 60000;
}
protected function getTrueAlpha($alpha) {
return (string) 100 - $alpha . '000';
}
protected function setColorProperties($color, $alpha, $type) {
return array(
'type' => (string) $type,
'value' => (string) $color,
'alpha' => (string) $this->getTrueAlpha($alpha)
);
}
protected function getLineStyleArrowSize($array_selector, $array_kay_selector) {
$sizes = array(
1 => array('w' => 'sm', 'len' => 'sm'),
2 => array('w' => 'sm', 'len' => 'med'),
3 => array('w' => 'sm', 'len' => 'lg'),
4 => array('w' => 'med', 'len' => 'sm'),
5 => array('w' => 'med', 'len' => 'med'),
6 => array('w' => 'med', 'len' => 'lg'),
7 => array('w' => 'lg', 'len' => 'sm'),
8 => array('w' => 'lg', 'len' => 'med'),
9 => array('w' => 'lg', 'len' => 'lg')
);
return $sizes[$array_selector][$array_kay_selector];
}
protected function getShadowPresetsMap($shadow_presets_option) {
$presets_options = array(
//OUTER
1 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '2700000',
'algn' => 'tl',
'rotWithShape' => '0'
),
2 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '5400000',
'algn' => 't',
'rotWithShape' => '0'
),
3 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '8100000',
'algn' => 'tr',
'rotWithShape' => '0'
),
4 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'algn' => 'l',
'rotWithShape' => '0'
),
5 => array(
'effect' => 'outerShdw',
'size' => array(
'sx' => '102000',
'sy' => '102000'
)
,
'blur' => '63500',
'distance' => '38100',
'algn' => 'ctr',
'rotWithShape' => '0'
),
6 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '10800000',
'algn' => 'r',
'rotWithShape' => '0'
),
7 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '18900000',
'algn' => 'bl',
'rotWithShape' => '0'
),
8 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '16200000',
'rotWithShape' => '0'
),
9 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '13500000',
'algn' => 'br',
'rotWithShape' => '0'
),
//INNER
10 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '2700000',
),
11 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '5400000',
),
12 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '8100000',
),
13 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
),
14 => array(
'effect' => 'innerShdw',
'blur' => '114300',
),
15 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '10800000',
),
16 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '18900000',
),
17 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '16200000',
),
18 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '13500000',
),
//perspective
19 => array(
'effect' => 'outerShdw',
'blur' => '152400',
'distance' => '317500',
'size' => array(
'sx' => '90000',
'sy' => '-19000',
),
'direction' => '5400000',
'rotWithShape' => '0',
),
20 => array(
'effect' => 'outerShdw',
'blur' => '76200',
'direction' => '18900000',
'size' => array(
'sy' => '23000',
'kx' => '-1200000',
),
'algn' => 'bl',
'rotWithShape' => '0',
),
21 => array(
'effect' => 'outerShdw',
'blur' => '76200',
'direction' => '13500000',
'size' => array(
'sy' => '23000',
'kx' => '1200000',
),
'algn' => 'br',
'rotWithShape' => '0',
),
22 => array(
'effect' => 'outerShdw',
'blur' => '76200',
'distance' => '12700',
'direction' => '2700000',
'size' => array(
'sy' => '-23000',
'kx' => '-800400',
),
'algn' => 'bl',
'rotWithShape' => '0',
),
23 => array(
'effect' => 'outerShdw',
'blur' => '76200',
'distance' => '12700',
'direction' => '8100000',
'size' => array(
'sy' => '-23000',
'kx' => '800400',
),
'algn' => 'br',
'rotWithShape' => '0',
),
);
return $presets_options[$shadow_presets_option];
}
protected function getArrayElementsValue($properties, $elements) {
$reference = & $properties;
if (!is_array($elements)) {
return $reference[$elements];
} else {
foreach ($elements as $keys) {
$reference = & $reference[$keys];
}
return $reference;
} }
return $this; protected function getExcelPointsAngle($angle)
} {
return $angle * 60000;
}
protected function getTrueAlpha($alpha)
{
return (string) 100 - $alpha . '000';
}
protected function setColorProperties($color, $alpha, $type)
{
return array(
'type' => (string) $type,
'value' => (string) $color,
'alpha' => (string) $this->getTrueAlpha($alpha)
);
}
protected function getLineStyleArrowSize($array_selector, $array_kay_selector) {
$sizes = array(
1 => array('w' => 'sm', 'len' => 'sm'),
2 => array('w' => 'sm', 'len' => 'med'),
3 => array('w' => 'sm', 'len' => 'lg'),
4 => array('w' => 'med', 'len' => 'sm'),
5 => array('w' => 'med', 'len' => 'med'),
6 => array('w' => 'med', 'len' => 'lg'),
7 => array('w' => 'lg', 'len' => 'sm'),
8 => array('w' => 'lg', 'len' => 'med'),
9 => array('w' => 'lg', 'len' => 'lg')
);
return $sizes[$array_selector][$array_kay_selector];
}
protected function getShadowPresetsMap($shadow_presets_option) {
$presets_options = array(
//OUTER
1 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '2700000',
'algn' => 'tl',
'rotWithShape' => '0'
),
2 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '5400000',
'algn' => 't',
'rotWithShape' => '0'
),
3 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '8100000',
'algn' => 'tr',
'rotWithShape' => '0'
),
4 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'algn' => 'l',
'rotWithShape' => '0'
),
5 => array(
'effect' => 'outerShdw',
'size' => array(
'sx' => '102000',
'sy' => '102000'
)
,
'blur' => '63500',
'distance' => '38100',
'algn' => 'ctr',
'rotWithShape' => '0'
),
6 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '10800000',
'algn' => 'r',
'rotWithShape' => '0'
),
7 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '18900000',
'algn' => 'bl',
'rotWithShape' => '0'
),
8 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '16200000',
'rotWithShape' => '0'
),
9 => array(
'effect' => 'outerShdw',
'blur' => '50800',
'distance' => '38100',
'direction' => '13500000',
'algn' => 'br',
'rotWithShape' => '0'
),
//INNER
10 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '2700000',
),
11 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '5400000',
),
12 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '8100000',
),
13 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
),
14 => array(
'effect' => 'innerShdw',
'blur' => '114300',
),
15 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '10800000',
),
16 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '18900000',
),
17 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '16200000',
),
18 => array(
'effect' => 'innerShdw',
'blur' => '63500',
'distance' => '50800',
'direction' => '13500000',
),
//perspective
19 => array(
'effect' => 'outerShdw',
'blur' => '152400',
'distance' => '317500',
'size' => array(
'sx' => '90000',
'sy' => '-19000',
),
'direction' => '5400000',
'rotWithShape' => '0',
),
20 => array(
'effect' => 'outerShdw',
'blur' => '76200',
'direction' => '18900000',
'size' => array(
'sy' => '23000',
'kx' => '-1200000',
),
'algn' => 'bl',
'rotWithShape' => '0',
),
21 => array(
'effect' => 'outerShdw',
'blur' => '76200',
'direction' => '13500000',
'size' => array(
'sy' => '23000',
'kx' => '1200000',
),
'algn' => 'br',
'rotWithShape' => '0',
),
22 => array(
'effect' => 'outerShdw',
'blur' => '76200',
'distance' => '12700',
'direction' => '2700000',
'size' => array(
'sy' => '-23000',
'kx' => '-800400',
),
'algn' => 'bl',
'rotWithShape' => '0',
),
23 => array(
'effect' => 'outerShdw',
'blur' => '76200',
'distance' => '12700',
'direction' => '8100000',
'size' => array(
'sy' => '-23000',
'kx' => '800400',
),
'algn' => 'br',
'rotWithShape' => '0',
),
);
return $presets_options[$shadow_presets_option];
}
protected function getArrayElementsValue($properties, $elements) {
$reference = & $properties;
if (!is_array($elements)) {
return $reference[$elements];
} else {
foreach ($elements as $keys) {
$reference = & $reference[$keys];
}
return $reference;
}
return $this;
}
} }

File diff suppressed because it is too large Load Diff