From 891981928d268176c8538cfcd20ffa93c1821951 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Sun, 11 Mar 2012 17:58:38 +0000 Subject: [PATCH] Doc Block changes git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@87638 2327b42d-5241-43d6-9e2a-de5ac946f064 --- Classes/PHPExcel/CachedObjectStorage/APC.php | 34 +- .../CachedObjectStorage/CacheBase.php | 58 +- .../PHPExcel/CachedObjectStorage/DiscISAM.php | 14 +- .../PHPExcel/CachedObjectStorage/ICache.php | 58 +- .../PHPExcel/CachedObjectStorage/Igbinary.php | 16 +- .../PHPExcel/CachedObjectStorage/Memcache.php | 34 +- .../PHPExcel/CachedObjectStorage/Memory.php | 10 +- .../CachedObjectStorage/MemoryGZip.php | 10 +- .../CachedObjectStorage/MemorySerialized.php | 10 +- .../PHPExcel/CachedObjectStorage/PHPTemp.php | 14 +- .../PHPExcel/CachedObjectStorage/SQLite.php | 36 +- .../PHPExcel/CachedObjectStorage/SQLite3.php | 32 +- .../PHPExcel/CachedObjectStorage/Wincache.php | 34 +- Classes/PHPExcel/Calculation.php | 262 +++--- Classes/PHPExcel/Calculation/DateTime.php | 16 +- Classes/PHPExcel/Calculation/Engineering.php | 4 +- Classes/PHPExcel/Calculation/Financial.php | 320 +++---- Classes/PHPExcel/Calculation/Functions.php | 236 +++--- Classes/PHPExcel/Calculation/Logical.php | 98 +-- Classes/PHPExcel/Calculation/LookupRef.php | 160 ++-- Classes/PHPExcel/Calculation/MathTrig.php | 296 +++---- Classes/PHPExcel/Calculation/Statistical.php | 795 +++++++++--------- Classes/PHPExcel/Calculation/TextData.php | 106 +-- Classes/PHPExcel/Chart/DataSeriesValues.php | 94 +-- Classes/PHPExcel/Chart/Legend.php | 40 +- Classes/PHPExcel/DocumentProperties.php | 36 +- Classes/PHPExcel/IOFactory.php | 110 +-- Classes/PHPExcel/Reader/CSV.php | 174 ++-- Classes/PHPExcel/Reader/Excel2003XML.php | 8 +- Classes/PHPExcel/Reader/Excel2007.php | 72 +- Classes/PHPExcel/Reader/Excel5.php | 54 +- Classes/PHPExcel/Reader/Gnumeric.php | 56 +- Classes/PHPExcel/Reader/OOCalc.php | 53 +- Classes/PHPExcel/Reader/SYLK.php | 8 +- Classes/PHPExcel/Settings.php | 52 +- Classes/PHPExcel/Shared/OLE/PPS/Root.php | 4 +- Classes/PHPExcel/Shared/String.php | 4 +- Classes/PHPExcel/Worksheet.php | 35 +- Classes/PHPExcel/Worksheet/CellIterator.php | 6 +- Classes/PHPExcel/Worksheet/PageSetup.php | 124 +-- Classes/PHPExcel/Writer/Excel2007.php | 16 +- Classes/PHPExcel/Writer/Excel2007/Chart.php | 113 +++ .../Writer/Excel2007/ContentTypes.php | 3 +- Classes/PHPExcel/Writer/Excel2007/Drawing.php | 6 +- 44 files changed, 1931 insertions(+), 1790 deletions(-) diff --git a/Classes/PHPExcel/CachedObjectStorage/APC.php b/Classes/PHPExcel/CachedObjectStorage/APC.php index ff242486..c888059d 100644 --- a/Classes/PHPExcel/CachedObjectStorage/APC.php +++ b/Classes/PHPExcel/CachedObjectStorage/APC.php @@ -55,12 +55,12 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach /** - * Add or Update a cell in cache identified by coordinate address + * Add or Update a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param string $pCoord Coordinate address of the cell to update + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -77,11 +77,11 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach /** - * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? + * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? * - * @param string $pCoord Coordinate address of the cell to check - * @return void - * @return boolean + * @param string $pCoord Coordinate address of the cell to check + * @return void + * @return boolean */ public function isDataSet($pCoord) { // Check if the requested entry is the current object, or exists in the cache @@ -140,10 +140,10 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach /** - * Delete a cell in cache identified by coordinate address + * Delete a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @param string $pCoord Coordinate address of the cell to delete + * @throws Exception */ public function deleteCacheData($pCoord) { // Delete the entry from APC @@ -155,9 +155,9 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach /** - * Clone the cell collection + * Clone the cell collection * - * @return void + * @return void */ public function copyCellCollection(PHPExcel_Worksheet $parent) { parent::copyCellCollection($parent); @@ -221,10 +221,10 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build + * Identify whether the caching method is currently available + * Some methods are dependent on the availability of certain extensions being enabled in the PHP build * - * @return boolean + * @return boolean */ public static function cacheMethodIsAvailable() { if (!function_exists('apc_store')) { diff --git a/Classes/PHPExcel/CachedObjectStorage/CacheBase.php b/Classes/PHPExcel/CachedObjectStorage/CacheBase.php index bc6351ed..4f2789ae 100644 --- a/Classes/PHPExcel/CachedObjectStorage/CacheBase.php +++ b/Classes/PHPExcel/CachedObjectStorage/CacheBase.php @@ -36,39 +36,39 @@ class PHPExcel_CachedObjectStorage_CacheBase { /** - * Parent worksheet + * Parent worksheet * - * @var PHPExcel_Worksheet + * @var PHPExcel_Worksheet */ protected $_parent; /** - * The currently active Cell + * The currently active Cell * - * @var PHPExcel_Cell + * @var PHPExcel_Cell */ protected $_currentObject = null; /** - * Coordinate address of the currently active Cell + * Coordinate address of the currently active Cell * - * @var string + * @var string */ protected $_currentObjectID = null; /** - * Flag indicating whether the currently active Cell requires saving + * Flag indicating whether the currently active Cell requires saving * - * @var boolean + * @var boolean */ protected $_currentCellIsDirty = true; /** - * An array of cells or cell pointers for the worksheet cells held in this cache, + * An array of cells or cell pointers for the worksheet cells held in this cache, * and indexed by their coordinate address within the worksheet * - * @var array of mixed + * @var array of mixed */ protected $_cellCache = array(); @@ -82,10 +82,10 @@ class PHPExcel_CachedObjectStorage_CacheBase { /** - * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? + * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? * - * @param string $pCoord Coordinate address of the cell to check - * @return boolean + * @param string $pCoord Coordinate address of the cell to check + * @return boolean */ public function isDataSet($pCoord) { if ($pCoord === $this->_currentObjectID) { @@ -97,11 +97,11 @@ class PHPExcel_CachedObjectStorage_CacheBase { /** - * Add or Update a cell in cache + * Add or Update a cell in cache * - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function updateCacheData(PHPExcel_Cell $cell) { return $this->addCacheData($cell->getCoordinate(),$cell); @@ -109,10 +109,10 @@ class PHPExcel_CachedObjectStorage_CacheBase { /** - * Delete a cell in cache identified by coordinate address + * Delete a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @param string $pCoord Coordinate address of the cell to delete + * @throws Exception */ public function deleteCacheData($pCoord) { if ($pCoord === $this->_currentObjectID) { @@ -129,9 +129,9 @@ class PHPExcel_CachedObjectStorage_CacheBase { /** - * Get a list of all cell addresses currently held in cache + * Get a list of all cell addresses currently held in cache * - * @return array of string + * @return array of string */ public function getCellList() { return array_keys($this->_cellCache); @@ -139,9 +139,9 @@ class PHPExcel_CachedObjectStorage_CacheBase { /** - * Sort the list of all cell addresses currently held in cache by row and column + * Sort the list of all cell addresses currently held in cache by row and column * - * @return void + * @return void */ public function getSortedCellList() { $sortKeys = array(); @@ -215,9 +215,9 @@ class PHPExcel_CachedObjectStorage_CacheBase { } /** - * Clone the cell collection + * Clone the cell collection * - * @return void + * @return void */ public function copyCellCollection(PHPExcel_Worksheet $parent) { $this->_parent = $parent; @@ -228,10 +228,10 @@ class PHPExcel_CachedObjectStorage_CacheBase { /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build + * Identify whether the caching method is currently available + * Some methods are dependent on the availability of certain extensions being enabled in the PHP build * - * @return boolean + * @return boolean */ public static function cacheMethodIsAvailable() { return true; diff --git a/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php b/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php index d9421902..aa0bd072 100644 --- a/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php +++ b/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php @@ -58,12 +58,12 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage /** - * Add or Update a cell in cache identified by coordinate address + * Add or Update a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param string $pCoord Coordinate address of the cell to update + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -110,9 +110,9 @@ class PHPExcel_CachedObjectStorage_DiscISAM extends PHPExcel_CachedObjectStorage /** - * Clone the cell collection + * Clone the cell collection * - * @return void + * @return void */ public function copyCellCollection(PHPExcel_Worksheet $parent) { parent::copyCellCollection($parent); diff --git a/Classes/PHPExcel/CachedObjectStorage/ICache.php b/Classes/PHPExcel/CachedObjectStorage/ICache.php index 84c8fd5e..cf6ca5c7 100644 --- a/Classes/PHPExcel/CachedObjectStorage/ICache.php +++ b/Classes/PHPExcel/CachedObjectStorage/ICache.php @@ -36,76 +36,76 @@ interface PHPExcel_CachedObjectStorage_ICache { /** - * Add or Update a cell in cache identified by coordinate address + * Add or Update a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param string $pCoord Coordinate address of the cell to update + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell); /** - * Add or Update a cell in cache + * Add or Update a cell in cache * - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function updateCacheData(PHPExcel_Cell $cell); /** - * Fetch a cell from cache identified by coordinate address + * Fetch a cell from cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to retrieve - * @return PHPExcel_Cell Cell that was found, or null if not found - * @throws Exception + * @param string $pCoord Coordinate address of the cell to retrieve + * @return PHPExcel_Cell Cell that was found, or null if not found + * @throws Exception */ public function getCacheData($pCoord); /** - * Delete a cell in cache identified by coordinate address + * Delete a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @param string $pCoord Coordinate address of the cell to delete + * @throws Exception */ public function deleteCacheData($pCoord); /** - * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? + * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? * - * @param string $pCoord Coordinate address of the cell to check - * @return void - * @return boolean + * @param string $pCoord Coordinate address of the cell to check + * @return void + * @return boolean */ public function isDataSet($pCoord); /** - * Get a list of all cell addresses currently held in cache + * Get a list of all cell addresses currently held in cache * - * @return array of string + * @return array of string */ public function getCellList(); /** - * Get the list of all cell addresses currently held in cache sorted by column and row + * Get the list of all cell addresses currently held in cache sorted by column and row * - * @return void + * @return void */ public function getSortedCellList(); /** - * Clone the cell collection + * Clone the cell collection * - * @return void + * @return void */ public function copyCellCollection(PHPExcel_Worksheet $parent); /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build + * Identify whether the caching method is currently available + * Some methods are dependent on the availability of certain extensions being enabled in the PHP build * - * @return boolean + * @return boolean */ public static function cacheMethodIsAvailable(); diff --git a/Classes/PHPExcel/CachedObjectStorage/Igbinary.php b/Classes/PHPExcel/CachedObjectStorage/Igbinary.php index f6a4ec9c..ecfe2d13 100644 --- a/Classes/PHPExcel/CachedObjectStorage/Igbinary.php +++ b/Classes/PHPExcel/CachedObjectStorage/Igbinary.php @@ -47,12 +47,12 @@ class PHPExcel_CachedObjectStorage_Igbinary extends PHPExcel_CachedObjectStorage /** - * Add or Update a cell in cache identified by coordinate address + * Add or Update a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param string $pCoord Coordinate address of the cell to update + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -110,10 +110,10 @@ class PHPExcel_CachedObjectStorage_Igbinary extends PHPExcel_CachedObjectStorage /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build + * Identify whether the caching method is currently available + * Some methods are dependent on the availability of certain extensions being enabled in the PHP build * - * @return boolean + * @return boolean */ public static function cacheMethodIsAvailable() { if (!function_exists('igbinary_serialize')) { diff --git a/Classes/PHPExcel/CachedObjectStorage/Memcache.php b/Classes/PHPExcel/CachedObjectStorage/Memcache.php index abd1c4e5..4af094db 100644 --- a/Classes/PHPExcel/CachedObjectStorage/Memcache.php +++ b/Classes/PHPExcel/CachedObjectStorage/Memcache.php @@ -60,12 +60,12 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage /** - * Add or Update a cell in cache identified by coordinate address + * Add or Update a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param string $pCoord Coordinate address of the cell to update + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -82,11 +82,11 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage /** - * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? + * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? * - * @param string $pCoord Coordinate address of the cell to check - * @return void - * @return boolean + * @param string $pCoord Coordinate address of the cell to check + * @return void + * @return boolean */ public function isDataSet($pCoord) { // Check if the requested entry is the current object, or exists in the cache @@ -145,10 +145,10 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage /** - * Delete a cell in cache identified by coordinate address + * Delete a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @param string $pCoord Coordinate address of the cell to delete + * @throws Exception */ public function deleteCacheData($pCoord) { // Delete the entry from Memcache @@ -160,9 +160,9 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage /** - * Clone the cell collection + * Clone the cell collection * - * @return void + * @return void */ public function copyCellCollection(PHPExcel_Worksheet $parent) { parent::copyCellCollection($parent); @@ -238,10 +238,10 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage } // function __destruct() /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build + * Identify whether the caching method is currently available + * Some methods are dependent on the availability of certain extensions being enabled in the PHP build * - * @return boolean + * @return boolean */ public static function cacheMethodIsAvailable() { if (!function_exists('memcache_add')) { diff --git a/Classes/PHPExcel/CachedObjectStorage/Memory.php b/Classes/PHPExcel/CachedObjectStorage/Memory.php index a495ca6e..4461b9bd 100644 --- a/Classes/PHPExcel/CachedObjectStorage/Memory.php +++ b/Classes/PHPExcel/CachedObjectStorage/Memory.php @@ -36,12 +36,12 @@ class PHPExcel_CachedObjectStorage_Memory extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache { /** - * Add or Update a cell in cache identified by coordinate address + * Add or Update a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param string $pCoord Coordinate address of the cell to update + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { $this->_cellCache[$pCoord] = $cell; diff --git a/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php b/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php index 6d3aee43..4cb52443 100644 --- a/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php +++ b/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php @@ -47,12 +47,12 @@ class PHPExcel_CachedObjectStorage_MemoryGZip extends PHPExcel_CachedObjectStora /** - * Add or Update a cell in cache identified by coordinate address + * Add or Update a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param string $pCoord Coordinate address of the cell to update + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { diff --git a/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php b/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php index 2f21c297..47946062 100644 --- a/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php +++ b/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php @@ -47,12 +47,12 @@ class PHPExcel_CachedObjectStorage_MemorySerialized extends PHPExcel_CachedObjec /** - * Add or Update a cell in cache identified by coordinate address + * Add or Update a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param string $pCoord Coordinate address of the cell to update + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { diff --git a/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php b/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php index 05a991b9..e2c732f1 100644 --- a/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php +++ b/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php @@ -57,12 +57,12 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_ /** - * Add or Update a cell in cache identified by coordinate address + * Add or Update a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param string $pCoord Coordinate address of the cell to update + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -109,9 +109,9 @@ class PHPExcel_CachedObjectStorage_PHPTemp extends PHPExcel_CachedObjectStorage_ /** - * Clone the cell collection + * Clone the cell collection * - * @return void + * @return void */ public function copyCellCollection(PHPExcel_Worksheet $parent) { parent::copyCellCollection($parent); diff --git a/Classes/PHPExcel/CachedObjectStorage/SQLite.php b/Classes/PHPExcel/CachedObjectStorage/SQLite.php index 5813714b..e5085d48 100644 --- a/Classes/PHPExcel/CachedObjectStorage/SQLite.php +++ b/Classes/PHPExcel/CachedObjectStorage/SQLite.php @@ -51,12 +51,12 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C /** - * Add or Update a cell in cache identified by coordinate address + * Add or Update a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param string $pCoord Coordinate address of the cell to update + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -107,10 +107,10 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C /** - * Is a value set for an indexed cell? + * Is a value set for an indexed cell? * - * @param string $pCoord Coordinate address of the cell to check - * @return boolean + * @param string $pCoord Coordinate address of the cell to check + * @return boolean */ public function isDataSet($pCoord) { if ($pCoord === $this->_currentObjectID) { @@ -131,10 +131,10 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C /** - * Delete a cell in cache identified by coordinate address + * Delete a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @param string $pCoord Coordinate address of the cell to delete + * @throws Exception */ public function deleteCacheData($pCoord) { if ($pCoord === $this->_currentObjectID) { @@ -152,9 +152,9 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C /** - * Get a list of all cell addresses currently held in cache + * Get a list of all cell addresses currently held in cache * - * @return array of string + * @return array of string */ public function getCellList() { $query = "SELECT id FROM kvp_".$this->_TableName; @@ -172,9 +172,9 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C /** - * Clone the cell collection + * Clone the cell collection * - * @return void + * @return void */ public function copyCellCollection(PHPExcel_Worksheet $parent) { // Get a new id for the new table name @@ -222,10 +222,10 @@ class PHPExcel_CachedObjectStorage_SQLite extends PHPExcel_CachedObjectStorage_C /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build + * Identify whether the caching method is currently available + * Some methods are dependent on the availability of certain extensions being enabled in the PHP build * - * @return boolean + * @return boolean */ public static function cacheMethodIsAvailable() { if (!function_exists('sqlite_open')) { diff --git a/Classes/PHPExcel/CachedObjectStorage/SQLite3.php b/Classes/PHPExcel/CachedObjectStorage/SQLite3.php index 541d097f..7329ec54 100644 --- a/Classes/PHPExcel/CachedObjectStorage/SQLite3.php +++ b/Classes/PHPExcel/CachedObjectStorage/SQLite3.php @@ -55,12 +55,12 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ /** - * Add or Update a cell in cache identified by coordinate address + * Add or Update a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param string $pCoord Coordinate address of the cell to update + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -112,8 +112,8 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ /** * Is a value set for an indexed cell? * - * @param string $pCoord Coordinate address of the cell to check - * @return boolean + * @param string $pCoord Coordinate address of the cell to check + * @return boolean */ public function isDataSet($pCoord) { if ($pCoord === $this->_currentObjectID) { @@ -136,8 +136,8 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ /** * Delete a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @param string $pCoord Coordinate address of the cell to delete + * @throws Exception */ public function deleteCacheData($pCoord) { if ($pCoord === $this->_currentObjectID) { @@ -156,9 +156,9 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ /** - * Get a list of all cell addresses currently held in cache + * Get a list of all cell addresses currently held in cache * - * @return array of string + * @return array of string */ public function getCellList() { $query = "SELECT id FROM kvp_".$this->_TableName; @@ -176,9 +176,9 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ /** - * Clone the cell collection + * Clone the cell collection * - * @return void + * @return void */ public function copyCellCollection(PHPExcel_Worksheet $parent) { // Get a new id for the new table name @@ -229,10 +229,10 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build + * Identify whether the caching method is currently available + * Some methods are dependent on the availability of certain extensions being enabled in the PHP build * - * @return boolean + * @return boolean */ public static function cacheMethodIsAvailable() { if (!class_exists('SQLite3')) { diff --git a/Classes/PHPExcel/CachedObjectStorage/Wincache.php b/Classes/PHPExcel/CachedObjectStorage/Wincache.php index f370ecd7..0c90dfea 100644 --- a/Classes/PHPExcel/CachedObjectStorage/Wincache.php +++ b/Classes/PHPExcel/CachedObjectStorage/Wincache.php @@ -64,12 +64,12 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage /** - * Add or Update a cell in cache identified by coordinate address + * Add or Update a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return void - * @throws Exception + * @param string $pCoord Coordinate address of the cell to update + * @param PHPExcel_Cell $cell Cell to update + * @return void + * @throws Exception */ public function addCacheData($pCoord, PHPExcel_Cell $cell) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { @@ -86,11 +86,11 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage /** - * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? + * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? * - * @param string $pCoord Coordinate address of the cell to check - * @return void - * @return boolean + * @param string $pCoord Coordinate address of the cell to check + * @return void + * @return boolean */ public function isDataSet($pCoord) { // Check if the requested entry is the current object, or exists in the cache @@ -151,10 +151,10 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage /** - * Delete a cell in cache identified by coordinate address + * Delete a cell in cache identified by coordinate address * - * @param string $pCoord Coordinate address of the cell to delete - * @throws Exception + * @param string $pCoord Coordinate address of the cell to delete + * @throws Exception */ public function deleteCacheData($pCoord) { // Delete the entry from Wincache @@ -166,9 +166,9 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage /** - * Clone the cell collection + * Clone the cell collection * - * @return void + * @return void */ public function copyCellCollection(PHPExcel_Worksheet $parent) { parent::copyCellCollection($parent); @@ -233,10 +233,10 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build + * Identify whether the caching method is currently available + * Some methods are dependent on the availability of certain extensions being enabled in the PHP build * - * @return boolean + * @return boolean */ public static function cacheMethodIsAvailable() { if (!function_exists('wincache_ucache_add')) { diff --git a/Classes/PHPExcel/Calculation.php b/Classes/PHPExcel/Calculation.php index cbc05704..e4c1ea45 100644 --- a/Classes/PHPExcel/Calculation.php +++ b/Classes/PHPExcel/Calculation.php @@ -61,8 +61,8 @@ if (!defined('CALCULATION_REGEXP_CELLREF')) { */ class PHPExcel_Calculation { - /** Constants */ - /** Regular Expressions */ + /** Constants */ + /** Regular Expressions */ // Numeric operand const CALCULATION_REGEXP_NUMBER = '[-+]?\d*\.?\d+(e[-+]?\d+)?'; // String operand @@ -79,7 +79,7 @@ class PHPExcel_Calculation { const CALCULATION_REGEXP_ERROR = '\#[A-Z][A-Z0_\/]*[!\?]?'; - /** constants */ + /** constants */ const RETURN_ARRAY_AS_ERROR = 'error'; const RETURN_ARRAY_AS_VALUE = 'value'; const RETURN_ARRAY_AS_ARRAY = 'array'; @@ -88,47 +88,47 @@ class PHPExcel_Calculation { /** - * Instance of this class + * Instance of this class * - * @access private - * @var PHPExcel_Calculation + * @access private + * @var PHPExcel_Calculation */ private static $_instance; /** - * Calculation cache + * Calculation cache * - * @access private - * @var array + * @access private + * @var array */ private static $_calculationCache = array (); /** - * Calculation cache enabled + * Calculation cache enabled * - * @access private - * @var boolean + * @access private + * @var boolean */ private static $_calculationCacheEnabled = true; /** - * Calculation cache expiration time + * Calculation cache expiration time * - * @access private - * @var float + * @access private + * @var float */ private static $_calculationCacheExpirationTime = 15; /** - * List of operators that can be used within formulae - * The true/false value indicates whether it is a binary operator or a unary operator + * List of operators that can be used within formulae + * The true/false value indicates whether it is a binary operator or a unary operator * - * @access private - * @var array + * @access private + * @var array */ private static $_operators = array('+' => true, '-' => true, '*' => true, '/' => true, '^' => true, '&' => true, '%' => false, '~' => false, @@ -138,10 +138,10 @@ class PHPExcel_Calculation { /** - * List of binary operators (those that expect two operands) + * List of binary operators (those that expect two operands) * - * @access private - * @var array + * @access private + * @var array */ private static $_binaryOperators = array('+' => true, '-' => true, '*' => true, '/' => true, '^' => true, '&' => true, '>' => true, '<' => true, @@ -150,63 +150,63 @@ class PHPExcel_Calculation { ); /** - * Flag to determine how formula errors should be handled + * Flag to determine how formula errors should be handled * If true, then a user error will be triggered * If false, then an exception will be thrown * - * @access public - * @var boolean + * @access public + * @var boolean * */ public $suppressFormulaErrors = false; /** - * Error message for any error that was raised/thrown by the calculation engine + * Error message for any error that was raised/thrown by the calculation engine * - * @access public - * @var string + * @access public + * @var string * */ public $formulaError = null; /** - * Flag to determine whether a debug log should be generated by the calculation engine + * Flag to determine whether a debug log should be generated by the calculation engine * If true, then a debug log will be generated * If false, then a debug log will not be generated * - * @access public - * @var boolean + * @access public + * @var boolean * */ public $writeDebugLog = false; /** - * Flag to determine whether a debug log should be echoed by the calculation engine + * Flag to determine whether a debug log should be echoed by the calculation engine * If true, then a debug log will be echoed * If false, then a debug log will not be echoed - * A debug log can only be echoed if it is generated + * A debug log can only be echoed if it is generated * - * @access public - * @var boolean + * @access public + * @var boolean * */ public $echoDebugLog = false; /** - * An array of the nested cell references accessed by the calculation engine, used for the debug log + * An array of the nested cell references accessed by the calculation engine, used for the debug log * - * @access private - * @var array of string + * @access private + * @var array of string * */ private $debugLogStack = array(); /** - * The debug log generated by the calculation engine + * The debug log generated by the calculation engine * - * @access public - * @var array of string + * @access public + * @var array of string * */ public $debugLog = array(); @@ -1704,10 +1704,10 @@ class PHPExcel_Calculation { } /** - * Get an instance of this class + * Get an instance of this class * - * @access public - * @return PHPExcel_Calculation + * @access public + * @return PHPExcel_Calculation */ public static function getInstance() { if (!isset(self::$_instance) || (self::$_instance === NULL)) { @@ -1719,11 +1719,11 @@ class PHPExcel_Calculation { /** - * Flush the calculation cache for any existing instance of this class + * Flush the calculation cache for any existing instance of this class * but only if a PHPExcel_Calculation instance exists * - * @access public - * @return null + * @access public + * @return null */ public static function flushInstance() { if (isset(self::$_instance) && (self::$_instance !== NULL)) { @@ -1733,10 +1733,10 @@ class PHPExcel_Calculation { /** - * __clone implementation. Cloning should not be allowed in a Singleton! + * __clone implementation. Cloning should not be allowed in a Singleton! * - * @access public - * @throws Exception + * @access public + * @throws Exception */ public final function __clone() { throw new Exception ('Cloning a Singleton is not allowed!'); @@ -1744,31 +1744,31 @@ class PHPExcel_Calculation { /** - * Return the locale-specific translation of TRUE + * Return the locale-specific translation of TRUE * - * @access public - * @return string locale-specific translation of TRUE + * @access public + * @return string locale-specific translation of TRUE */ public static function getTRUE() { return self::$_localeBoolean['TRUE']; } /** - * Return the locale-specific translation of FALSE + * Return the locale-specific translation of FALSE * - * @access public - * @return string locale-specific translation of FALSE + * @access public + * @return string locale-specific translation of FALSE */ public static function getFALSE() { return self::$_localeBoolean['FALSE']; } /** - * Set the Array Return Type (Array or Value of first element in the array) + * Set the Array Return Type (Array or Value of first element in the array) * - * @access public - * @param string $returnType Array return type - * @return boolean Success or failure + * @access public + * @param string $returnType Array return type + * @return boolean Success or failure */ public static function setArrayReturnType($returnType) { if (($returnType == self::RETURN_ARRAY_AS_VALUE) || @@ -1782,10 +1782,10 @@ class PHPExcel_Calculation { /** - * Return the Array Return Type (Array or Value of first element in the array) + * Return the Array Return Type (Array or Value of first element in the array) * - * @access public - * @return string $returnType Array return type + * @access public + * @return string $returnType Array return type */ public static function getArrayReturnType() { return self::$returnArrayAsType; @@ -1793,10 +1793,10 @@ class PHPExcel_Calculation { /** - * Is calculation caching enabled? + * Is calculation caching enabled? * - * @access public - * @return boolean + * @access public + * @return boolean */ public function getCalculationCacheEnabled() { return self::$_calculationCacheEnabled; @@ -1804,10 +1804,10 @@ class PHPExcel_Calculation { /** - * Enable/disable calculation cache + * Enable/disable calculation cache * - * @access public - * @param boolean $pValue + * @access public + * @param boolean $pValue */ public function setCalculationCacheEnabled($pValue = true) { self::$_calculationCacheEnabled = $pValue; @@ -1816,7 +1816,7 @@ class PHPExcel_Calculation { /** - * Enable calculation cache + * Enable calculation cache */ public function enableCalculationCache() { $this->setCalculationCacheEnabled(true); @@ -1824,7 +1824,7 @@ class PHPExcel_Calculation { /** - * Disable calculation cache + * Disable calculation cache */ public function disableCalculationCache() { $this->setCalculationCacheEnabled(false); @@ -1832,7 +1832,7 @@ class PHPExcel_Calculation { /** - * Clear calculation cache + * Clear calculation cache */ public function clearCalculationCache() { self::$_calculationCache = array(); @@ -1840,9 +1840,9 @@ class PHPExcel_Calculation { /** - * Get calculation cache expiration time + * Get calculation cache expiration time * - * @return float + * @return float */ public function getCalculationCacheExpirationTime() { return self::$_calculationCacheExpirationTime; @@ -1850,9 +1850,9 @@ class PHPExcel_Calculation { /** - * Set calculation cache expiration time + * Set calculation cache expiration time * - * @param float $pValue + * @param float $pValue */ public function setCalculationCacheExpirationTime($pValue = 15) { self::$_calculationCacheExpirationTime = $pValue; @@ -1862,9 +1862,9 @@ class PHPExcel_Calculation { /** - * Get the currently defined locale code + * Get the currently defined locale code * - * @return string + * @return string */ public function getLocale() { return self::$_localeLanguage; @@ -1872,9 +1872,9 @@ class PHPExcel_Calculation { /** - * Set the locale code + * Set the locale code * - * @return boolean + * @return boolean */ public function setLocale($locale='en_us') { // Identify our locale and language @@ -2069,10 +2069,10 @@ class PHPExcel_Calculation { /** - * Wrap string values in quotes + * Wrap string values in quotes * - * @param mixed $value - * @return mixed + * @param mixed $value + * @return mixed */ public static function _wrapResult($value) { if (is_string($value)) { @@ -2093,10 +2093,10 @@ class PHPExcel_Calculation { /** - * Remove quotes used as a wrapper to identify string values + * Remove quotes used as a wrapper to identify string values * - * @param mixed $value - * @return mixed + * @param mixed $value + * @return mixed */ public static function _unwrapResult($value) { if (is_string($value)) { @@ -2114,13 +2114,13 @@ class PHPExcel_Calculation { /** - * Calculate cell value (using formula from a cell ID) - * Retained for backward compatibility + * Calculate cell value (using formula from a cell ID) + * Retained for backward compatibility * - * @access public - * @param PHPExcel_Cell $pCell Cell to calculate - * @return mixed - * @throws Exception + * @access public + * @param PHPExcel_Cell $pCell Cell to calculate + * @return mixed + * @throws Exception */ public function calculate(PHPExcel_Cell $pCell = null) { try { @@ -2132,13 +2132,13 @@ class PHPExcel_Calculation { /** - * Calculate the value of a cell formula + * Calculate the value of a cell formula * - * @access public - * @param PHPExcel_Cell $pCell Cell to calculate - * @param Boolean $resetLog Flag indicating whether the debug log should be reset or not - * @return mixed - * @throws Exception + * @access public + * @param PHPExcel_Cell $pCell Cell to calculate + * @param Boolean $resetLog Flag indicating whether the debug log should be reset or not + * @return mixed + * @throws Exception */ public function calculateCellValue(PHPExcel_Cell $pCell = null, $resetLog = true) { if ($resetLog) { @@ -2198,11 +2198,11 @@ class PHPExcel_Calculation { /** - * Validate and parse a formula string + * Validate and parse a formula string * - * @param string $formula Formula to parse - * @return array - * @throws Exception + * @param string $formula Formula to parse + * @return array + * @throws Exception */ public function parseFormula($formula) { // Basic validation that this is indeed a formula @@ -2218,11 +2218,11 @@ class PHPExcel_Calculation { /** - * Calculate the value of a formula + * Calculate the value of a formula * - * @param string $formula Formula to parse - * @return mixed - * @throws Exception + * @param string $formula Formula to parse + * @return mixed + * @throws Exception */ public function calculateFormula($formula, $cellID=null, PHPExcel_Cell $pCell = null) { // Initialise the logging settings @@ -2248,13 +2248,13 @@ class PHPExcel_Calculation { /** - * Parse a cell formula and calculate its value + * Parse a cell formula and calculate its value * - * @param string $formula The formula to parse and calculate - * @param string $cellID The ID (e.g. A3) of the cell that we are calculating - * @param PHPExcel_Cell $pCell Cell to calculate - * @return mixed - * @throws Exception + * @param string $formula The formula to parse and calculate + * @param string $cellID The ID (e.g. A3) of the cell that we are calculating + * @param PHPExcel_Cell $pCell Cell to calculate + * @return mixed + * @throws Exception */ public function _calculateFormulaValue($formula, $cellID=null, PHPExcel_Cell $pCell = null) { // echo ''.$cellID.'
'; @@ -2341,11 +2341,11 @@ class PHPExcel_Calculation { /** - * Ensure that paired matrix operands are both matrices and of the same size + * Ensure that paired matrix operands are both matrices and of the same size * - * @param mixed &$operand1 First matrix operand - * @param mixed &$operand2 Second matrix operand - * @param integer $resize Flag indicating whether the matrices should be resized to match + * @param mixed &$operand1 First matrix operand + * @param mixed &$operand2 Second matrix operand + * @param integer $resize Flag indicating whether the matrices should be resized to match * and (if so), whether the smaller dimension should grow or the * larger should shrink. * 0 = no resize @@ -2383,10 +2383,10 @@ class PHPExcel_Calculation { /** - * Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0 + * Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0 * - * @param mixed &$matrix matrix operand - * @return array An array comprising the number of rows, and number of columns + * @param mixed &$matrix matrix operand + * @return array An array comprising the number of rows, and number of columns */ public static function _getMatrixDimensions(&$matrix) { $matrixRows = count($matrix); @@ -2405,10 +2405,10 @@ class PHPExcel_Calculation { /** - * Ensure that paired matrix operands are both matrices of the same size + * Ensure that paired matrix operands are both matrices of the same size * - * @param mixed &$matrix1 First matrix operand - * @param mixed &$matrix2 Second matrix operand + * @param mixed &$matrix1 First matrix operand + * @param mixed &$matrix2 Second matrix operand */ private static function _resizeMatricesShrink(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) { if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { @@ -2444,10 +2444,10 @@ class PHPExcel_Calculation { /** - * Ensure that paired matrix operands are both matrices of the same size + * Ensure that paired matrix operands are both matrices of the same size * - * @param mixed &$matrix1 First matrix operand - * @param mixed &$matrix2 Second matrix operand + * @param mixed &$matrix1 First matrix operand + * @param mixed &$matrix2 Second matrix operand */ private static function _resizeMatricesExtend(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) { if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { @@ -2487,10 +2487,10 @@ class PHPExcel_Calculation { /** - * Format details of an operand for display in the log (based on operand type) + * Format details of an operand for display in the log (based on operand type) * - * @param mixed $value First matrix operand - * @return mixed + * @param mixed $value First matrix operand + * @return mixed */ private function _showValue($value) { if ($this->writeDebugLog) { @@ -2522,10 +2522,10 @@ class PHPExcel_Calculation { /** - * Format type and details of an operand for display in the log (based on operand type) + * Format type and details of an operand for display in the log (based on operand type) * - * @param mixed $value First matrix operand - * @return mixed + * @param mixed $value First matrix operand + * @return mixed */ private function _showTypeDetails($value) { if ($this->writeDebugLog) { diff --git a/Classes/PHPExcel/Calculation/DateTime.php b/Classes/PHPExcel/Calculation/DateTime.php index c89396b9..e6c0befb 100644 --- a/Classes/PHPExcel/Calculation/DateTime.php +++ b/Classes/PHPExcel/Calculation/DateTime.php @@ -591,21 +591,21 @@ class PHPExcel_Calculation_DateTime { /** - * YEARFRAC + * YEARFRAC * - * Calculates the fraction of the year represented by the number of whole days between two dates (the start_date and the - * end_date). Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or obligations - * to assign to a specific term. + * Calculates the fraction of the year represented by the number of whole days between two dates (the start_date and the + * end_date). Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or obligations + * to assign to a specific term. * - * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer) or date object, or a standard date string - * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer) or date object, or a standard date string - * @param integer $method Method used for the calculation + * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer) or date object, or a standard date string + * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer) or date object, or a standard date string + * @param integer $method Method used for the calculation * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @return float fraction of the year + * @return float fraction of the year */ public static function YEARFRAC($startDate = 0, $endDate = 0, $method = 0) { $startDate = PHPExcel_Calculation_Functions::flattenSingleValue($startDate); diff --git a/Classes/PHPExcel/Calculation/Engineering.php b/Classes/PHPExcel/Calculation/Engineering.php index d752e998..de0af755 100644 --- a/Classes/PHPExcel/Calculation/Engineering.php +++ b/Classes/PHPExcel/Calculation/Engineering.php @@ -744,7 +744,7 @@ class PHPExcel_Calculation_Engineering { * * Returns the modified Bessel function, which is equivalent to the Bessel function evaluated for purely imaginary arguments * - * @TODO Better handling of the approximation method to support the differences between Excel/Gnumeric and Open/Libre Office + * @TODO Better handling of the approximation method to support the differences between Excel/Gnumeric and Open/Libre Office * * @param float $x * @param float $n @@ -789,7 +789,7 @@ class PHPExcel_Calculation_Engineering { * * Returns the Bessel function * - * @TODO Better handling of the approximation method to support the differences between Excel/Gnumeric and Open/Libre Office + * @TODO Better handling of the approximation method to support the differences between Excel/Gnumeric and Open/Libre Office * * @param float $x * @param float $n diff --git a/Classes/PHPExcel/Calculation/Financial.php b/Classes/PHPExcel/Calculation/Financial.php index 33b7c752..f97693c4 100644 --- a/Classes/PHPExcel/Calculation/Financial.php +++ b/Classes/PHPExcel/Calculation/Financial.php @@ -135,22 +135,22 @@ class PHPExcel_Calculation_Financial { /** - * ACCRINT + * ACCRINT * - * Returns the discount rate for a security. + * Returns the discount rate for a security. * - * @param mixed issue The security's issue date. - * @param mixed firstinter The security's first interest date. - * @param mixed settlement The security's settlement date. - * @param float rate The security's annual coupon rate. - * @param float par The security's par value. - * @param int basis The type of day count to use. + * @param mixed issue The security's issue date. + * @param mixed firstinter The security's first interest date. + * @param mixed settlement The security's settlement date. + * @param float rate The security's annual coupon rate. + * @param float par The security's par value. + * @param int basis The type of day count to use. * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @return float + * @return float */ public static function ACCRINT($issue, $firstinter, $settlement, $rate, $par=1000, $frequency=1, $basis=0) { $issue = PHPExcel_Calculation_Functions::flattenSingleValue($issue); @@ -179,21 +179,21 @@ class PHPExcel_Calculation_Financial { /** - * ACCRINTM + * ACCRINTM * - * Returns the discount rate for a security. + * Returns the discount rate for a security. * - * @param mixed issue The security's issue date. - * @param mixed settlement The security's settlement date. - * @param float rate The security's annual coupon rate. - * @param float par The security's par value. - * @param int basis The type of day count to use. + * @param mixed issue The security's issue date. + * @param mixed settlement The security's settlement date. + * @param float rate The security's annual coupon rate. + * @param float par The security's par value. + * @param int basis The type of day count to use. * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @return float + * @return float */ public static function ACCRINTM($issue, $settlement, $rate, $par=1000, $basis=0) { $issue = PHPExcel_Calculation_Functions::flattenSingleValue($issue); @@ -472,18 +472,18 @@ class PHPExcel_Calculation_Financial { /** - * CUMIPMT + * CUMIPMT * - * Returns the cumulative interest paid on a loan between start_period and end_period. + * Returns the cumulative interest paid on a loan between start_period and end_period. * - * @param float $rate Interest rate per period - * @param int $nper Number of periods - * @param float $pv Present Value - * @param int start The first period in the calculation. + * @param float $rate Interest rate per period + * @param int $nper Number of periods + * @param float $pv Present Value + * @param int start The first period in the calculation. * Payment periods are numbered beginning with 1. - * @param int end The last period in the calculation. - * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period - * @return float + * @param int end The last period in the calculation. + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * @return float */ public static function CUMIPMT($rate, $nper, $pv, $start, $end, $type = 0) { $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); @@ -512,18 +512,18 @@ class PHPExcel_Calculation_Financial { /** - * CUMPRINC + * CUMPRINC * - * Returns the cumulative principal paid on a loan between start_period and end_period. + * Returns the cumulative principal paid on a loan between start_period and end_period. * - * @param float $rate Interest rate per period - * @param int $nper Number of periods - * @param float $pv Present Value - * @param int start The first period in the calculation. + * @param float $rate Interest rate per period + * @param int $nper Number of periods + * @param float $pv Present Value + * @param int start The first period in the calculation. * Payment periods are numbered beginning with 1. - * @param int end The last period in the calculation. - * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period - * @return float + * @param int end The last period in the calculation. + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * @return float */ public static function CUMPRINC($rate, $nper, $pv, $start, $end, $type = 0) { $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); @@ -552,19 +552,19 @@ class PHPExcel_Calculation_Financial { /** - * DB + * DB * - * Returns the depreciation of an asset for a specified period using the fixed-declining balance method. - * This form of depreciation is used if you want to get a higher depreciation value at the beginning of the depreciation + * Returns the depreciation of an asset for a specified period using the fixed-declining balance method. + * This form of depreciation is used if you want to get a higher depreciation value at the beginning of the depreciation * (as opposed to linear depreciation). The depreciation value is reduced with every depreciation period by the * depreciation already deducted from the initial cost. * - * @param float cost Initial cost of the asset. - * @param float salvage Value at the end of the depreciation. (Sometimes called the salvage value of the asset) - * @param int life Number of periods over which the asset is depreciated. (Sometimes called the useful life of the asset) - * @param int period The period for which you want to calculate the depreciation. Period must use the same units as life. - * @param float month Number of months in the first year. If month is omitted, it defaults to 12. - * @return float + * @param float cost Initial cost of the asset. + * @param float salvage Value at the end of the depreciation. (Sometimes called the salvage value of the asset) + * @param int life Number of periods over which the asset is depreciated. (Sometimes called the useful life of the asset) + * @param int period The period for which you want to calculate the depreciation. Period must use the same units as life. + * @param float month Number of months in the first year. If month is omitted, it defaults to 12. + * @return float */ public static function DB($cost, $salvage, $life, $period, $month=12) { $cost = (float) PHPExcel_Calculation_Functions::flattenSingleValue($cost); @@ -606,17 +606,17 @@ class PHPExcel_Calculation_Financial { /** - * DDB + * DDB * - * Returns the depreciation of an asset for a specified period using the double-declining balance method or some other method you specify. + * Returns the depreciation of an asset for a specified period using the double-declining balance method or some other method you specify. * - * @param float cost Initial cost of the asset. - * @param float salvage Value at the end of the depreciation. (Sometimes called the salvage value of the asset) - * @param int life Number of periods over which the asset is depreciated. (Sometimes called the useful life of the asset) - * @param int period The period for which you want to calculate the depreciation. Period must use the same units as life. - * @param float factor The rate at which the balance declines. + * @param float cost Initial cost of the asset. + * @param float salvage Value at the end of the depreciation. (Sometimes called the salvage value of the asset) + * @param int life Number of periods over which the asset is depreciated. (Sometimes called the useful life of the asset) + * @param int period The period for which you want to calculate the depreciation. Period must use the same units as life. + * @param float factor The rate at which the balance declines. * If factor is omitted, it is assumed to be 2 (the double-declining balance method). - * @return float + * @return float */ public static function DDB($cost, $salvage, $life, $period, $factor=2.0) { $cost = (float) PHPExcel_Calculation_Functions::flattenSingleValue($cost); @@ -650,23 +650,23 @@ class PHPExcel_Calculation_Financial { /** - * DISC + * DISC * - * Returns the discount rate for a security. + * Returns the discount rate for a security. * - * @param mixed settlement The security's settlement date. + * @param mixed settlement The security's settlement date. * The security settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. + * @param mixed maturity The security's maturity date. * The maturity date is the date when the security expires. - * @param int price The security's price per $100 face value. - * @param int redemption the security's redemption value per $100 face value. - * @param int basis The type of day count to use. + * @param int price The security's price per $100 face value. + * @param int redemption the security's redemption value per $100 face value. + * @param int basis The type of day count to use. * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @return float + * @return float */ public static function DISC($settlement, $maturity, $price, $redemption, $basis=0) { $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); @@ -824,23 +824,23 @@ class PHPExcel_Calculation_Financial { /** - * INTRATE + * INTRATE * - * Returns the interest rate for a fully invested security. + * Returns the interest rate for a fully invested security. * - * @param mixed settlement The security's settlement date. + * @param mixed settlement The security's settlement date. * The security settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. + * @param mixed maturity The security's maturity date. * The maturity date is the date when the security expires. - * @param int investment The amount invested in the security. - * @param int redemption The amount to be received at maturity. - * @param int basis The type of day count to use. + * @param int investment The amount invested in the security. + * @param int redemption The amount to be received at maturity. + * @param int basis The type of day count to use. * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @return float + * @return float */ public static function INTRATE($settlement, $maturity, $investment, $redemption, $basis=0) { $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); @@ -867,17 +867,17 @@ class PHPExcel_Calculation_Financial { /** - * IPMT + * IPMT * - * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate. + * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate. * - * @param float $rate Interest rate per period - * @param int $per Period for which we want to find the interest - * @param int $nper Number of periods - * @param float $pv Present Value - * @param float $fv Future Value - * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period - * @return float + * @param float $rate Interest rate per period + * @param int $per Period for which we want to find the interest + * @param int $nper Number of periods + * @param float $pv Present Value + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * @return float */ public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) { $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); @@ -1040,12 +1040,12 @@ class PHPExcel_Calculation_Financial { * * Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate. * - * @param float $rate Interest rate per period - * @param int $pmt Periodic payment (annuity) - * @param float $pv Present Value - * @param float $fv Future Value - * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period - * @return float + * @param float $rate Interest rate per period + * @param int $pmt Periodic payment (annuity) + * @param float $pv Present Value + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * @return float */ public static function NPER($rate = 0, $pmt = 0, $pv = 0, $fv = 0, $type = 0) { $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); @@ -1138,17 +1138,17 @@ class PHPExcel_Calculation_Financial { /** - * PPMT + * PPMT * - * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate. + * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate. * - * @param float $rate Interest rate per period - * @param int $per Period for which we want to find the interest - * @param int $nper Number of periods - * @param float $pv Present Value - * @param float $fv Future Value - * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period - * @return float + * @param float $rate Interest rate per period + * @param int $per Period for which we want to find the interest + * @param int $nper Number of periods + * @param float $pv Present Value + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * @return float */ public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) { $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); @@ -1214,23 +1214,23 @@ class PHPExcel_Calculation_Financial { /** - * PRICEDISC + * PRICEDISC * - * Returns the price per $100 face value of a discounted security. + * Returns the price per $100 face value of a discounted security. * - * @param mixed settlement The security's settlement date. + * @param mixed settlement The security's settlement date. * The security settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. + * @param mixed maturity The security's maturity date. * The maturity date is the date when the security expires. - * @param int discount The security's discount rate. - * @param int redemption The security's redemption value per $100 face value. - * @param int basis The type of day count to use. + * @param int discount The security's discount rate. + * @param int redemption The security's redemption value per $100 face value. + * @param int basis The type of day count to use. * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @return float + * @return float */ public static function PRICEDISC($settlement, $maturity, $discount, $redemption, $basis=0) { $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); @@ -1257,24 +1257,24 @@ class PHPExcel_Calculation_Financial { /** - * PRICEMAT + * PRICEMAT * - * Returns the price per $100 face value of a security that pays interest at maturity. + * Returns the price per $100 face value of a security that pays interest at maturity. * - * @param mixed settlement The security's settlement date. + * @param mixed settlement The security's settlement date. * The security's settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. + * @param mixed maturity The security's maturity date. * The maturity date is the date when the security expires. - * @param mixed issue The security's issue date. - * @param int rate The security's interest rate at date of issue. - * @param int yield The security's annual yield. - * @param int basis The type of day count to use. + * @param mixed issue The security's issue date. + * @param int rate The security's interest rate at date of issue. + * @param int yield The security's annual yield. + * @param int basis The type of day count to use. * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @return float + * @return float */ public static function PRICEMAT($settlement, $maturity, $issue, $rate, $yield, $basis=0) { $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); @@ -1399,23 +1399,23 @@ class PHPExcel_Calculation_Financial { /** - * RECEIVED + * RECEIVED * - * Returns the price per $100 face value of a discounted security. + * Returns the price per $100 face value of a discounted security. * - * @param mixed settlement The security's settlement date. + * @param mixed settlement The security's settlement date. * The security settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. + * @param mixed maturity The security's maturity date. * The maturity date is the date when the security expires. - * @param int investment The amount invested in the security. - * @param int discount The security's discount rate. - * @param int basis The type of day count to use. + * @param int investment The amount invested in the security. + * @param int discount The security's discount rate. + * @param int basis The type of day count to use. * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @return float + * @return float */ public static function RECEIVED($settlement, $maturity, $investment, $discount, $basis=0) { $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); @@ -1496,16 +1496,16 @@ class PHPExcel_Calculation_Financial { /** - * TBILLEQ + * TBILLEQ * - * Returns the bond-equivalent yield for a Treasury bill. + * Returns the bond-equivalent yield for a Treasury bill. * - * @param mixed settlement The Treasury bill's settlement date. + * @param mixed settlement The Treasury bill's settlement date. * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer. - * @param mixed maturity The Treasury bill's maturity date. + * @param mixed maturity The Treasury bill's maturity date. * The maturity date is the date when the Treasury bill expires. - * @param int discount The Treasury bill's discount rate. - * @return float + * @param int discount The Treasury bill's discount rate. + * @return float */ public static function TBILLEQ($settlement, $maturity, $discount) { $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); @@ -1534,16 +1534,16 @@ class PHPExcel_Calculation_Financial { /** - * TBILLPRICE + * TBILLPRICE * - * Returns the yield for a Treasury bill. + * Returns the yield for a Treasury bill. * - * @param mixed settlement The Treasury bill's settlement date. + * @param mixed settlement The Treasury bill's settlement date. * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer. - * @param mixed maturity The Treasury bill's maturity date. + * @param mixed maturity The Treasury bill's maturity date. * The maturity date is the date when the Treasury bill expires. - * @param int discount The Treasury bill's discount rate. - * @return float + * @param int discount The Treasury bill's discount rate. + * @return float */ public static function TBILLPRICE($settlement, $maturity, $discount) { $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); @@ -1586,16 +1586,16 @@ class PHPExcel_Calculation_Financial { /** - * TBILLYIELD + * TBILLYIELD * - * Returns the yield for a Treasury bill. + * Returns the yield for a Treasury bill. * - * @param mixed settlement The Treasury bill's settlement date. + * @param mixed settlement The Treasury bill's settlement date. * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer. - * @param mixed maturity The Treasury bill's maturity date. + * @param mixed maturity The Treasury bill's maturity date. * The maturity date is the date when the Treasury bill expires. - * @param int price The Treasury bill's price per $100 face value. - * @return float + * @param int price The Treasury bill's price per $100 face value. + * @return float */ public static function TBILLYIELD($settlement, $maturity, $price) { $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); @@ -1672,18 +1672,18 @@ class PHPExcel_Calculation_Financial { /** - * XNPV + * XNPV * - * Returns the net present value for a schedule of cash flows that is not necessarily periodic. - * To calculate the net present value for a series of cash flows that is periodic, use the NPV function. + * Returns the net present value for a schedule of cash flows that is not necessarily periodic. + * To calculate the net present value for a series of cash flows that is periodic, use the NPV function. * - * Excel Function: + * Excel Function: * =XNPV(rate,values,dates) * - * @param float $rate The discount rate to apply to the cash flows. - * @param array of float $values A series of cash flows that corresponds to a schedule of payments in dates. The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment. If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. The series of values must contain at least one positive value and one negative value. - * @param array of mixed $dates A schedule of payment dates that corresponds to the cash flow payments. The first payment date indicates the beginning of the schedule of payments. All other dates must be later than this date, but they may occur in any order. - * @return float + * @param float $rate The discount rate to apply to the cash flows. + * @param array of float $values A series of cash flows that corresponds to a schedule of payments in dates. The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment. If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. The series of values must contain at least one positive value and one negative value. + * @param array of mixed $dates A schedule of payment dates that corresponds to the cash flow payments. The first payment date indicates the beginning of the schedule of payments. All other dates must be later than this date, but they may occur in any order. + * @return float */ public static function XNPV($rate, $values, $dates) { $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); @@ -1705,23 +1705,23 @@ class PHPExcel_Calculation_Financial { /** - * YIELDDISC + * YIELDDISC * - * Returns the annual yield of a security that pays interest at maturity. + * Returns the annual yield of a security that pays interest at maturity. * - * @param mixed settlement The security's settlement date. + * @param mixed settlement The security's settlement date. * The security's settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. + * @param mixed maturity The security's maturity date. * The maturity date is the date when the security expires. - * @param int price The security's price per $100 face value. - * @param int redemption The security's redemption value per $100 face value. - * @param int basis The type of day count to use. + * @param int price The security's price per $100 face value. + * @param int redemption The security's redemption value per $100 face value. + * @param int basis The type of day count to use. * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @return float + * @return float */ public static function YIELDDISC($settlement, $maturity, $price, $redemption, $basis=0) { $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); @@ -1753,24 +1753,24 @@ class PHPExcel_Calculation_Financial { /** - * YIELDMAT + * YIELDMAT * - * Returns the annual yield of a security that pays interest at maturity. + * Returns the annual yield of a security that pays interest at maturity. * - * @param mixed settlement The security's settlement date. + * @param mixed settlement The security's settlement date. * The security's settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. + * @param mixed maturity The security's maturity date. * The maturity date is the date when the security expires. - * @param mixed issue The security's issue date. - * @param int rate The security's interest rate at date of issue. - * @param int price The security's price per $100 face value. - * @param int basis The type of day count to use. + * @param mixed issue The security's issue date. + * @param int rate The security's interest rate at date of issue. + * @param int price The security's price per $100 face value. + * @param int basis The type of day count to use. * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @return float + * @return float */ public static function YIELDMAT($settlement, $maturity, $issue, $rate, $price, $basis=0) { $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); diff --git a/Classes/PHPExcel/Calculation/Functions.php b/Classes/PHPExcel/Calculation/Functions.php index 3420a2b7..f06dd6ef 100644 --- a/Classes/PHPExcel/Calculation/Functions.php +++ b/Classes/PHPExcel/Calculation/Functions.php @@ -69,26 +69,26 @@ class PHPExcel_Calculation_Functions { /** - * Compatibility mode to use for error checking and responses + * Compatibility mode to use for error checking and responses * - * @access private - * @var string + * @access private + * @var string */ protected static $compatibilityMode = self::COMPATIBILITY_EXCEL; /** - * Data Type to use when returning date values + * Data Type to use when returning date values * - * @access private - * @var string + * @access private + * @var string */ protected static $ReturnDateType = self::RETURNDATE_EXCEL; /** - * List of error codes + * List of error codes * - * @access private - * @var array + * @access private + * @var array */ protected static $_errorCodes = array( 'null' => '#NULL!', 'divisionbyzero' => '#DIV/0!', @@ -102,16 +102,16 @@ class PHPExcel_Calculation_Functions { /** - * Set the Compatibility Mode + * Set the Compatibility Mode * - * @access public - * @category Function Configuration - * @param string $compatibilityMode Compatibility Mode + * @access public + * @category Function Configuration + * @param string $compatibilityMode Compatibility Mode * Permitted values are: * PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL 'Excel' * PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' * PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc' - * @return boolean (Success or Failure) + * @return boolean (Success or Failure) */ public static function setCompatibilityMode($compatibilityMode) { if (($compatibilityMode == self::COMPATIBILITY_EXCEL) || @@ -125,11 +125,11 @@ class PHPExcel_Calculation_Functions { /** - * Return the current Compatibility Mode + * Return the current Compatibility Mode * - * @access public - * @category Function Configuration - * @return string Compatibility Mode + * @access public + * @category Function Configuration + * @return string Compatibility Mode * Possible Return values are: * PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL 'Excel' * PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' @@ -141,16 +141,16 @@ class PHPExcel_Calculation_Functions { /** - * Set the Return Date Format used by functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object) + * Set the Return Date Format used by functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object) * - * @access public - * @category Function Configuration - * @param string $returnDateType Return Date Format + * @access public + * @category Function Configuration + * @param string $returnDateType Return Date Format * Permitted values are: * PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC 'P' * PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT 'O' * PHPExcel_Calculation_Functions::RETURNDATE_EXCEL 'E' - * @return boolean Success or failure + * @return boolean Success or failure */ public static function setReturnDateType($returnDateType) { if (($returnDateType == self::RETURNDATE_PHP_NUMERIC) || @@ -164,11 +164,11 @@ class PHPExcel_Calculation_Functions { /** - * Return the current Return Date Format for functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object) + * Return the current Return Date Format for functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object) * - * @access public - * @category Function Configuration - * @return string Return Date Format + * @access public + * @category Function Configuration + * @return string Return Date Format * Possible Return values are: * PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC 'P' * PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT 'O' @@ -180,11 +180,11 @@ class PHPExcel_Calculation_Functions { /** - * DUMMY + * DUMMY * - * @access public - * @category Error Returns - * @return string #Not Yet Implemented + * @access public + * @category Error Returns + * @return string #Not Yet Implemented */ public static function DUMMY() { return '#Not Yet Implemented'; @@ -192,11 +192,11 @@ class PHPExcel_Calculation_Functions { /** - * DIV0 + * DIV0 * - * @access public - * @category Error Returns - * @return string #Not Yet Implemented + * @access public + * @category Error Returns + * @return string #Not Yet Implemented */ public static function DIV0() { return self::$_errorCodes['divisionbyzero']; @@ -204,17 +204,17 @@ class PHPExcel_Calculation_Functions { /** - * NA + * NA * - * Excel Function: + * Excel Function: * =NA() * - * Returns the error value #N/A + * Returns the error value #N/A * #N/A is the error value that means "no value is available." * - * @access public - * @category Logical Functions - * @return string #N/A! + * @access public + * @category Logical Functions + * @return string #N/A! */ public static function NA() { return self::$_errorCodes['na']; @@ -222,13 +222,13 @@ class PHPExcel_Calculation_Functions { /** - * NaN + * NaN * - * Returns the error value #NUM! + * Returns the error value #NUM! * - * @access public - * @category Error Returns - * @return string #NUM! + * @access public + * @category Error Returns + * @return string #NUM! */ public static function NaN() { return self::$_errorCodes['num']; @@ -236,13 +236,13 @@ class PHPExcel_Calculation_Functions { /** - * NAME + * NAME * - * Returns the error value #NAME? + * Returns the error value #NAME? * - * @access public - * @category Error Returns - * @return string #NAME? + * @access public + * @category Error Returns + * @return string #NAME? */ public static function NAME() { return self::$_errorCodes['name']; @@ -250,13 +250,13 @@ class PHPExcel_Calculation_Functions { /** - * REF + * REF * - * Returns the error value #REF! + * Returns the error value #REF! * - * @access public - * @category Error Returns - * @return string #REF! + * @access public + * @category Error Returns + * @return string #REF! */ public static function REF() { return self::$_errorCodes['reference']; @@ -264,13 +264,13 @@ class PHPExcel_Calculation_Functions { /** - * NULL + * NULL * - * Returns the error value #NULL! + * Returns the error value #NULL! * - * @access public - * @category Error Returns - * @return string #REF! + * @access public + * @category Error Returns + * @return string #REF! */ public static function NULL() { return self::$_errorCodes['null']; @@ -278,13 +278,13 @@ class PHPExcel_Calculation_Functions { /** - * VALUE + * VALUE * - * Returns the error value #VALUE! + * Returns the error value #VALUE! * - * @access public - * @category Error Returns - * @return string #VALUE! + * @access public + * @category Error Returns + * @return string #VALUE! */ public static function VALUE() { return self::$_errorCodes['value']; @@ -321,10 +321,10 @@ class PHPExcel_Calculation_Functions { /** - * ERROR_TYPE + * ERROR_TYPE * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function ERROR_TYPE($value = '') { $value = self::flattenSingleValue($value); @@ -341,10 +341,10 @@ class PHPExcel_Calculation_Functions { /** - * IS_BLANK + * IS_BLANK * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function IS_BLANK($value = NULL) { if (!is_null($value)) { @@ -356,10 +356,10 @@ class PHPExcel_Calculation_Functions { /** - * IS_ERR + * IS_ERR * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function IS_ERR($value = '') { $value = self::flattenSingleValue($value); @@ -369,10 +369,10 @@ class PHPExcel_Calculation_Functions { /** - * IS_ERROR + * IS_ERROR * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function IS_ERROR($value = '') { $value = self::flattenSingleValue($value); @@ -384,10 +384,10 @@ class PHPExcel_Calculation_Functions { /** - * IS_NA + * IS_NA * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function IS_NA($value = '') { $value = self::flattenSingleValue($value); @@ -397,10 +397,10 @@ class PHPExcel_Calculation_Functions { /** - * IS_EVEN + * IS_EVEN * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function IS_EVEN($value = NULL) { $value = self::flattenSingleValue($value); @@ -414,10 +414,10 @@ class PHPExcel_Calculation_Functions { /** - * IS_ODD + * IS_ODD * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function IS_ODD($value = NULL) { $value = self::flattenSingleValue($value); @@ -431,10 +431,10 @@ class PHPExcel_Calculation_Functions { /** - * IS_NUMBER + * IS_NUMBER * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function IS_NUMBER($value = NULL) { $value = self::flattenSingleValue($value); @@ -447,10 +447,10 @@ class PHPExcel_Calculation_Functions { /** - * IS_LOGICAL + * IS_LOGICAL * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function IS_LOGICAL($value = NULL) { $value = self::flattenSingleValue($value); @@ -460,10 +460,10 @@ class PHPExcel_Calculation_Functions { /** - * IS_TEXT + * IS_TEXT * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function IS_TEXT($value = NULL) { $value = self::flattenSingleValue($value); @@ -473,10 +473,10 @@ class PHPExcel_Calculation_Functions { /** - * IS_NONTEXT + * IS_NONTEXT * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function IS_NONTEXT($value = NULL) { return !self::IS_TEXT($value); @@ -484,9 +484,9 @@ class PHPExcel_Calculation_Functions { /** - * VERSION + * VERSION * - * @return string Version information + * @return string Version information */ public static function VERSION() { return 'PHPExcel ##VERSION##, ##DATE##'; @@ -494,12 +494,12 @@ class PHPExcel_Calculation_Functions { /** - * N + * N * - * Returns a value converted to a number + * Returns a value converted to a number * - * @param value The value you want converted - * @return number N converts values listed in the following table + * @param value The value you want converted + * @return number N converts values listed in the following table * If value is or refers to N returns * A number That number * A date The serial number of that date @@ -534,12 +534,12 @@ class PHPExcel_Calculation_Functions { /** - * TYPE + * TYPE * - * Returns a number that identifies the type of a value + * Returns a number that identifies the type of a value * - * @param value The value you want tested - * @return number N converts values listed in the following table + * @param value The value you want tested + * @return number N converts values listed in the following table * If value is or refers to N returns * A number 1 * Text 2 @@ -584,10 +584,10 @@ class PHPExcel_Calculation_Functions { /** - * Convert a multi-dimensional array to a simple 1-dimensional array + * Convert a multi-dimensional array to a simple 1-dimensional array * - * @param array $array Array to be flattened - * @return array Flattened array + * @param array $array Array to be flattened + * @return array Flattened array */ public static function flattenArray($array) { if (!is_array($array)) { @@ -616,10 +616,10 @@ class PHPExcel_Calculation_Functions { /** - * Convert a multi-dimensional array to a simple 1-dimensional array, but retain an element of indexing + * Convert a multi-dimensional array to a simple 1-dimensional array, but retain an element of indexing * - * @param array $array Array to be flattened - * @return array Flattened array + * @param array $array Array to be flattened + * @return array Flattened array */ public static function flattenArrayIndexed($array) { if (!is_array($array)) { @@ -648,10 +648,10 @@ class PHPExcel_Calculation_Functions { /** - * Convert an array to a single scalar value by extracting the first element + * Convert an array to a single scalar value by extracting the first element * - * @param mixed $value Array or scalar value - * @return mixed + * @param mixed $value Array or scalar value + * @return mixed */ public static function flattenSingleValue($value = '') { while (is_array($value)) { diff --git a/Classes/PHPExcel/Calculation/Logical.php b/Classes/PHPExcel/Calculation/Logical.php index 64d089dc..5d6a31c8 100644 --- a/Classes/PHPExcel/Calculation/Logical.php +++ b/Classes/PHPExcel/Calculation/Logical.php @@ -46,16 +46,16 @@ if (!defined('PHPEXCEL_ROOT')) { class PHPExcel_Calculation_Logical { /** - * TRUE + * TRUE * - * Returns the boolean TRUE. + * Returns the boolean TRUE. * - * Excel Function: + * Excel Function: * =TRUE() * - * @access public - * @category Logical Functions - * @return boolean True + * @access public + * @category Logical Functions + * @return boolean True */ public static function TRUE() { return TRUE; @@ -63,16 +63,16 @@ class PHPExcel_Calculation_Logical { /** - * FALSE + * FALSE * - * Returns the boolean FALSE. + * Returns the boolean FALSE. * - * Excel Function: + * Excel Function: * =FALSE() * - * @access public - * @category Logical Functions - * @return boolean False + * @access public + * @category Logical Functions + * @return boolean False */ public static function FALSE() { return FALSE; @@ -80,11 +80,11 @@ class PHPExcel_Calculation_Logical { /** - * LOGICAL_AND + * LOGICAL_AND * - * Returns boolean TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE. + * Returns boolean TRUE if all its arguments are TRUE; returns FALSE if one or more argument is FALSE. * - * Excel Function: + * Excel Function: * =AND(logical1[,logical2[, ...]]) * * The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays @@ -95,10 +95,10 @@ class PHPExcel_Calculation_Logical { * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value * - * @access public - * @category Logical Functions - * @param mixed $arg,... Data values - * @return boolean The logical AND of the arguments. + * @access public + * @category Logical Functions + * @param mixed $arg,... Data values + * @return boolean The logical AND of the arguments. */ public static function LOGICAL_AND() { // Return value @@ -135,11 +135,11 @@ class PHPExcel_Calculation_Logical { /** - * LOGICAL_OR + * LOGICAL_OR * - * Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE. + * Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE. * - * Excel Function: + * Excel Function: * =OR(logical1[,logical2[, ...]]) * * The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays @@ -150,10 +150,10 @@ class PHPExcel_Calculation_Logical { * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value * - * @access public - * @category Logical Functions - * @param mixed $arg,... Data values - * @return boolean The logical OR of the arguments. + * @access public + * @category Logical Functions + * @param mixed $arg,... Data values + * @return boolean The logical OR of the arguments. */ public static function LOGICAL_OR() { // Return value @@ -190,11 +190,11 @@ class PHPExcel_Calculation_Logical { /** - * NOT + * NOT * - * Returns the boolean inverse of the argument. + * Returns the boolean inverse of the argument. * - * Excel Function: + * Excel Function: * =NOT(logical) * * The argument must evaluate to a logical value such as TRUE or FALSE @@ -204,10 +204,10 @@ class PHPExcel_Calculation_Logical { * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value * - * @access public - * @category Logical Functions - * @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE - * @return boolean The boolean inverse of the argument. + * @access public + * @category Logical Functions + * @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE + * @return boolean The boolean inverse of the argument. */ public static function NOT($logical=FALSE) { $logical = PHPExcel_Calculation_Functions::flattenSingleValue($logical); @@ -226,11 +226,11 @@ class PHPExcel_Calculation_Logical { } // function NOT() /** - * STATEMENT_IF + * STATEMENT_IF * - * Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE. + * Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE. * - * Excel Function: + * Excel Function: * =IF(condition[,returnIfTrue[,returnIfFalse]]) * * Condition is any value or expression that can be evaluated to TRUE or FALSE. @@ -250,12 +250,12 @@ class PHPExcel_Calculation_Logical { * If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned. * ReturnIfFalse can be another formula. * - * @access public - * @category Logical Functions - * @param mixed $condition Condition to evaluate - * @param mixed $returnIfTrue Value to return when condition is true - * @param mixed $returnIfFalse Optional value to return when condition is false - * @return mixed The value of returnIfTrue or returnIfFalse determined by condition + * @access public + * @category Logical Functions + * @param mixed $condition Condition to evaluate + * @param mixed $returnIfTrue Value to return when condition is true + * @param mixed $returnIfFalse Optional value to return when condition is false + * @return mixed The value of returnIfTrue or returnIfFalse determined by condition */ public static function STATEMENT_IF($condition = TRUE, $returnIfTrue = 0, $returnIfFalse = FALSE) { $condition = (is_null($condition)) ? TRUE : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($condition); @@ -267,16 +267,16 @@ class PHPExcel_Calculation_Logical { /** - * IFERROR + * IFERROR * - * Excel Function: + * Excel Function: * =IFERROR(testValue,errorpart) * - * @access public - * @category Logical Functions - * @param mixed $testValue Value to check, is also the value returned when no error - * @param mixed $errorpart Value to return when testValue is an error condition - * @return mixed The value of errorpart or testValue determined by error condition + * @access public + * @category Logical Functions + * @param mixed $testValue Value to check, is also the value returned when no error + * @param mixed $errorpart Value to return when testValue is an error condition + * @return mixed The value of errorpart or testValue determined by error condition */ public static function IFERROR($testValue = '', $errorpart = '') { $testValue = (is_null($testValue)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($testValue); diff --git a/Classes/PHPExcel/Calculation/LookupRef.php b/Classes/PHPExcel/Calculation/LookupRef.php index aa8aac3b..ba89a114 100644 --- a/Classes/PHPExcel/Calculation/LookupRef.php +++ b/Classes/PHPExcel/Calculation/LookupRef.php @@ -47,25 +47,25 @@ class PHPExcel_Calculation_LookupRef { /** - * CELL_ADDRESS + * CELL_ADDRESS * - * Creates a cell address as text, given specified row and column numbers. + * Creates a cell address as text, given specified row and column numbers. * - * Excel Function: + * Excel Function: * =ADDRESS(row, column, [relativity], [referenceStyle], [sheetText]) * - * @param row Row number to use in the cell reference - * @param column Column number to use in the cell reference - * @param relativity Flag indicating the type of reference to return + * @param row Row number to use in the cell reference + * @param column Column number to use in the cell reference + * @param relativity Flag indicating the type of reference to return * 1 or omitted Absolute * 2 Absolute row; relative column * 3 Relative row; absolute column * 4 Relative - * @param referenceStyle A logical value that specifies the A1 or R1C1 reference style. + * @param referenceStyle A logical value that specifies the A1 or R1C1 reference style. * TRUE or omitted CELL_ADDRESS returns an A1-style reference * FALSE CELL_ADDRESS returns an R1C1-style reference - * @param sheetText Optional Name of worksheet to use - * @return string + * @param sheetText Optional Name of worksheet to use + * @return string */ public static function CELL_ADDRESS($row, $column, $relativity=1, $referenceStyle=True, $sheetText='') { $row = PHPExcel_Calculation_Functions::flattenSingleValue($row); @@ -96,18 +96,18 @@ class PHPExcel_Calculation_LookupRef { /** - * COLUMN + * COLUMN * - * Returns the column number of the given cell reference - * If the cell reference is a range of cells, COLUMN returns the column numbers of each column in the reference as a horizontal array. - * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the + * Returns the column number of the given cell reference + * If the cell reference is a range of cells, COLUMN returns the column numbers of each column in the reference as a horizontal array. + * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the * reference of the cell in which the COLUMN function appears; otherwise this function returns 0. * - * Excel Function: + * Excel Function: * =COLUMN([cellAddress]) * - * @param cellAddress A reference to a range of cells for which you want the column numbers - * @return integer or array of integer + * @param cellAddress A reference to a range of cells for which you want the column numbers + * @return integer or array of integer */ public static function COLUMN($cellAddress=Null) { if (is_null($cellAddress) || trim($cellAddress) === '') { return 0; } @@ -139,15 +139,15 @@ class PHPExcel_Calculation_LookupRef { /** - * COLUMNS + * COLUMNS * - * Returns the number of columns in an array or reference. + * Returns the number of columns in an array or reference. * - * Excel Function: + * Excel Function: * =COLUMNS(cellAddress) * - * @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns - * @return integer The number of columns in cellAddress + * @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns + * @return integer The number of columns in cellAddress */ public static function COLUMNS($cellAddress=Null) { if (is_null($cellAddress) || $cellAddress === '') { @@ -170,18 +170,18 @@ class PHPExcel_Calculation_LookupRef { /** - * ROW + * ROW * - * Returns the row number of the given cell reference - * If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference as a vertical array. - * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the + * Returns the row number of the given cell reference + * If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference as a vertical array. + * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the * reference of the cell in which the ROW function appears; otherwise this function returns 0. * - * Excel Function: + * Excel Function: * =ROW([cellAddress]) * - * @param cellAddress A reference to a range of cells for which you want the row numbers - * @return integer or array of integer + * @param cellAddress A reference to a range of cells for which you want the row numbers + * @return integer or array of integer */ public static function ROW($cellAddress=Null) { if (is_null($cellAddress) || trim($cellAddress) === '') { return 0; } @@ -214,15 +214,15 @@ class PHPExcel_Calculation_LookupRef { /** - * ROWS + * ROWS * - * Returns the number of rows in an array or reference. + * Returns the number of rows in an array or reference. * - * Excel Function: + * Excel Function: * =ROWS(cellAddress) * - * @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows - * @return integer The number of rows in cellAddress + * @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows + * @return integer The number of rows in cellAddress */ public static function ROWS($cellAddress=Null) { if (is_null($cellAddress) || $cellAddress === '') { @@ -244,16 +244,16 @@ class PHPExcel_Calculation_LookupRef { /** - * HYPERLINK + * HYPERLINK * - * Excel Function: + * Excel Function: * =HYPERLINK(linkURL,displayName) * - * @access public - * @category Logical Functions - * @param string $linkURL Value to check, is also the value returned when no error - * @param string $displayName Value to return when testValue is an error condition - * @return mixed The value of $displayName (or $linkURL if $displayName was blank) + * @access public + * @category Logical Functions + * @param string $linkURL Value to check, is also the value returned when no error + * @param string $displayName Value to return when testValue is an error condition + * @return mixed The value of $displayName (or $linkURL if $displayName was blank) */ public static function HYPERLINK($linkURL = '', $displayName = null, PHPExcel_Cell $pCell = null) { $args = func_get_args(); @@ -277,20 +277,20 @@ class PHPExcel_Calculation_LookupRef { /** - * INDIRECT + * INDIRECT * - * Returns the reference specified by a text string. - * References are immediately evaluated to display their contents. + * Returns the reference specified by a text string. + * References are immediately evaluated to display their contents. * - * Excel Function: + * Excel Function: * =INDIRECT(cellAddress) * - * NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010 + * NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010 * - * @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows - * @return mixed The cells referenced by cellAddress + * @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows + * @return mixed The cells referenced by cellAddress * - * @todo Support for the optional a1 parameter introduced in Excel 2010 + * @todo Support for the optional a1 parameter introduced in Excel 2010 * */ public static function INDIRECT($cellAddress=Null, PHPExcel_Cell $pCell = null) { @@ -334,29 +334,29 @@ class PHPExcel_Calculation_LookupRef { /** - * OFFSET + * OFFSET * - * Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells. - * The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and - * the number of columns to be returned. + * Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells. + * The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and + * the number of columns to be returned. * - * Excel Function: + * Excel Function: * =OFFSET(cellAddress, rows, cols, [height], [width]) * - * @param cellAddress The reference from which you want to base the offset. Reference must refer to a cell or + * @param cellAddress The reference from which you want to base the offset. Reference must refer to a cell or * range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value. - * @param rows The number of rows, up or down, that you want the upper-left cell to refer to. + * @param rows The number of rows, up or down, that you want the upper-left cell to refer to. * Using 5 as the rows argument specifies that the upper-left cell in the reference is * five rows below reference. Rows can be positive (which means below the starting reference) * or negative (which means above the starting reference). - * @param cols The number of columns, to the left or right, that you want the upper-left cell of the result + * @param cols The number of columns, to the left or right, that you want the upper-left cell of the result * to refer to. Using 5 as the cols argument specifies that the upper-left cell in the * reference is five columns to the right of reference. Cols can be positive (which means * to the right of the starting reference) or negative (which means to the left of the * starting reference). - * @param height The height, in number of rows, that you want the returned reference to be. Height must be a positive number. - * @param width The width, in number of columns, that you want the returned reference to be. Width must be a positive number. - * @return string A reference to a cell or range of cells + * @param height The height, in number of rows, that you want the returned reference to be. Height must be a positive number. + * @param width The width, in number of columns, that you want the returned reference to be. Width must be a positive number. + * @return string A reference to a cell or range of cells */ public static function OFFSET($cellAddress=Null,$rows=0,$columns=0,$height=null,$width=null) { $rows = PHPExcel_Calculation_Functions::flattenSingleValue($rows); @@ -427,22 +427,22 @@ class PHPExcel_Calculation_LookupRef { /** - * CHOOSE + * CHOOSE * - * Uses lookup_value to return a value from the list of value arguments. - * Use CHOOSE to select one of up to 254 values based on the lookup_value. + * Uses lookup_value to return a value from the list of value arguments. + * Use CHOOSE to select one of up to 254 values based on the lookup_value. * - * Excel Function: + * Excel Function: * =CHOOSE(index_num, value1, [value2], ...) * - * @param index_num Specifies which value argument is selected. + * @param index_num Specifies which value argument is selected. * Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number * between 1 and 254. - * @param value1... Value1 is required, subsequent values are optional. + * @param value1... Value1 is required, subsequent values are optional. * Between 1 to 254 value arguments from which CHOOSE selects a value or an action to perform based on * index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or * text. - * @return mixed The selected value + * @return mixed The selected value */ public static function CHOOSE() { $chooseArgs = func_get_args(); @@ -471,17 +471,17 @@ class PHPExcel_Calculation_LookupRef { /** - * MATCH + * MATCH * - * The MATCH function searches for a specified item in a range of cells + * The MATCH function searches for a specified item in a range of cells * - * Excel Function: + * Excel Function: * =MATCH(lookup_value, lookup_array, [match_type]) * - * @param lookup_value The value that you want to match in lookup_array - * @param lookup_array The range of cells being searched - * @param match_type The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below. If match_type is 1 or -1, the list has to be ordered. - * @return integer The relative position of the found item + * @param lookup_value The value that you want to match in lookup_array + * @param lookup_array The range of cells being searched + * @param match_type The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below. If match_type is 1 or -1, the list has to be ordered. + * @return integer The relative position of the found item */ public static function MATCH($lookup_value, $lookup_array, $match_type=1) { $lookup_array = PHPExcel_Calculation_Functions::flattenArray($lookup_array); @@ -584,17 +584,17 @@ class PHPExcel_Calculation_LookupRef { /** - * INDEX + * INDEX * - * Uses an index to choose a value from a reference or array + * Uses an index to choose a value from a reference or array * - * Excel Function: + * Excel Function: * =INDEX(range_array, row_num, [column_num]) * - * @param range_array A range of cells or an array constant - * @param row_num The row in array from which to return a value. If row_num is omitted, column_num is required. - * @param column_num The column in array from which to return a value. If column_num is omitted, row_num is required. - * @return mixed the value of a specified cell or array of cells + * @param range_array A range of cells or an array constant + * @param row_num The row in array from which to return a value. If row_num is omitted, column_num is required. + * @param column_num The column in array from which to return a value. If column_num is omitted, row_num is required. + * @return mixed the value of a specified cell or array of cells */ public static function INDEX($arrayValues,$rowNum = 0,$columnNum = 0) { diff --git a/Classes/PHPExcel/Calculation/MathTrig.php b/Classes/PHPExcel/Calculation/MathTrig.php index 994093a5..3a1faa5e 100644 --- a/Classes/PHPExcel/Calculation/MathTrig.php +++ b/Classes/PHPExcel/Calculation/MathTrig.php @@ -76,26 +76,26 @@ class PHPExcel_Calculation_MathTrig { /** - * ATAN2 + * ATAN2 * - * This function calculates the arc tangent of the two variables x and y. It is similar to + * This function calculates the arc tangent of the two variables x and y. It is similar to * calculating the arc tangent of y ÷ x, except that the signs of both arguments are used * to determine the quadrant of the result. - * The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a + * The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a * point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between * -pi and pi, excluding -pi. * - * Note that the Excel ATAN2() function accepts its arguments in the reverse order to the standard + * Note that the Excel ATAN2() function accepts its arguments in the reverse order to the standard * PHP atan2() function, so we need to reverse them here before calling the PHP atan() function. * - * Excel Function: + * Excel Function: * ATAN2(xCoordinate,yCoordinate) * - * @access public - * @category Mathematical and Trigonometric Functions - * @param float $xCoordinate The x-coordinate of the point. - * @param float $yCoordinate The y-coordinate of the point. - * @return float The inverse tangent of the specified x- and y-coordinates. + * @access public + * @category Mathematical and Trigonometric Functions + * @param float $xCoordinate The x-coordinate of the point. + * @param float $yCoordinate The y-coordinate of the point. + * @return float The inverse tangent of the specified x- and y-coordinates. */ public static function ATAN2($xCoordinate, $yCoordinate) { $xCoordinate = (float) PHPExcel_Calculation_Functions::flattenSingleValue($xCoordinate); @@ -110,13 +110,13 @@ class PHPExcel_Calculation_MathTrig { /** - * CEILING + * CEILING * - * Returns number rounded up, away from zero, to the nearest multiple of significance. + * Returns number rounded up, away from zero, to the nearest multiple of significance. * - * @param float $number Number to round - * @param float $significance Significance - * @return float Rounded Number + * @param float $number Number to round + * @param float $significance Significance + * @return float Rounded Number */ public static function CEILING($number,$significance=null) { $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); @@ -141,14 +141,14 @@ class PHPExcel_Calculation_MathTrig { /** - * COMBIN + * COMBIN * - * Returns the number of combinations for a given number of items. Use COMBIN to - * determine the total possible number of groups for a given number of items. + * Returns the number of combinations for a given number of items. Use COMBIN to + * determine the total possible number of groups for a given number of items. * - * @param int $numObjs Number of different objects - * @param int $numInSet Number of objects in each combination - * @return int Number of combinations + * @param int $numObjs Number of different objects + * @param int $numInSet Number of objects in each combination + * @return int Number of combinations */ public static function COMBIN($numObjs,$numInSet) { $numObjs = PHPExcel_Calculation_Functions::flattenSingleValue($numObjs); @@ -167,12 +167,12 @@ class PHPExcel_Calculation_MathTrig { /** - * EVEN + * EVEN * - * Returns number rounded up to the nearest even integer. + * Returns number rounded up to the nearest even integer. * - * @param float $number Number to round - * @return int Rounded Number + * @param float $number Number to round + * @return int Rounded Number */ public static function EVEN($number) { $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); @@ -192,12 +192,12 @@ class PHPExcel_Calculation_MathTrig { /** - * FACT + * FACT * - * Returns the factorial of a number. + * Returns the factorial of a number. * - * @param float $factVal Factorial Value - * @return int Factorial + * @param float $factVal Factorial Value + * @return int Factorial */ public static function FACT($factVal) { $factVal = PHPExcel_Calculation_Functions::flattenSingleValue($factVal); @@ -224,12 +224,12 @@ class PHPExcel_Calculation_MathTrig { /** - * FACTDOUBLE + * FACTDOUBLE * - * Returns the double factorial of a number. + * Returns the double factorial of a number. * - * @param float $factVal Factorial Value - * @return int Double Factorial + * @param float $factVal Factorial Value + * @return int Double Factorial */ public static function FACTDOUBLE($factVal) { $factLoop = PHPExcel_Calculation_Functions::flattenSingleValue($factVal); @@ -251,13 +251,13 @@ class PHPExcel_Calculation_MathTrig { /** - * FLOOR + * FLOOR * - * Rounds number down, toward zero, to the nearest multiple of significance. + * Rounds number down, toward zero, to the nearest multiple of significance. * - * @param float $number Number to round - * @param float $significance Significance - * @return float Rounded Number + * @param float $number Number to round + * @param float $significance Significance + * @return float Rounded Number */ public static function FLOOR($number,$significance=null) { $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); @@ -282,12 +282,12 @@ class PHPExcel_Calculation_MathTrig { /** - * GCD + * GCD * - * Returns the greatest common divisor of a series of numbers + * Returns the greatest common divisor of a series of numbers * - * @param $array Values to calculate the Greatest Common Divisor - * @return int Greatest Common Divisor + * @param $array Values to calculate the Greatest Common Divisor + * @return int Greatest Common Divisor */ public static function GCD() { $returnValue = 1; @@ -347,12 +347,12 @@ class PHPExcel_Calculation_MathTrig { /** - * INT + * INT * - * Casts a floating point value to an integer + * Casts a floating point value to an integer * - * @param float $number Number to cast to an integer - * @return integer Integer value + * @param float $number Number to cast to an integer + * @return integer Integer value */ public static function INT($number) { $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); @@ -370,12 +370,12 @@ class PHPExcel_Calculation_MathTrig { /** - * LCM + * LCM * - * Returns the lowest common multiplier of a series of numbers + * Returns the lowest common multiplier of a series of numbers * - * @param $array Values to calculate the Lowest Common Multiplier - * @return int Lowest Common Multiplier + * @param $array Values to calculate the Lowest Common Multiplier + * @return int Lowest Common Multiplier */ public static function LCM() { $returnValue = 1; @@ -414,18 +414,18 @@ class PHPExcel_Calculation_MathTrig { /** - * LOG_BASE + * LOG_BASE * - * Returns the logarithm of a number to a specified base. The default base is 10. + * Returns the logarithm of a number to a specified base. The default base is 10. * - * Excel Function: + * Excel Function: * LOG(number[,base]) * - * @access public - * @category Mathematical and Trigonometric Functions - * @param float $value The positive real number for which you want the logarithm - * @param float $base The base of the logarithm. If base is omitted, it is assumed to be 10. - * @return float + * @access public + * @category Mathematical and Trigonometric Functions + * @param float $value The positive real number for which you want the logarithm + * @param float $base The base of the logarithm. If base is omitted, it is assumed to be 10. + * @return float */ public static function LOG_BASE($number = NULL, $base=10) { $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); @@ -582,13 +582,13 @@ class PHPExcel_Calculation_MathTrig { /** - * MROUND + * MROUND * - * Rounds a number to the nearest multiple of a specified value + * Rounds a number to the nearest multiple of a specified value * - * @param float $number Number to round - * @param int $multiple Multiple to which you want to round $number - * @return float Rounded Number + * @param float $number Number to round + * @param int $multiple Multiple to which you want to round $number + * @return float Rounded Number */ public static function MROUND($number,$multiple) { $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); @@ -609,12 +609,12 @@ class PHPExcel_Calculation_MathTrig { /** - * MULTINOMIAL + * MULTINOMIAL * - * Returns the ratio of the factorial of a sum of values to the product of factorials. + * Returns the ratio of the factorial of a sum of values to the product of factorials. * - * @param array of mixed Data Series - * @return float + * @param array of mixed Data Series + * @return float */ public static function MULTINOMIAL() { $summer = 0; @@ -643,12 +643,12 @@ class PHPExcel_Calculation_MathTrig { /** - * ODD + * ODD * - * Returns number rounded up to the nearest odd integer. + * Returns number rounded up to the nearest odd integer. * - * @param float $number Number to round - * @return int Rounded Number + * @param float $number Number to round + * @return int Rounded Number */ public static function ODD($number) { $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); @@ -677,13 +677,13 @@ class PHPExcel_Calculation_MathTrig { /** - * POWER + * POWER * - * Computes x raised to the power y. + * Computes x raised to the power y. * - * @param float $x - * @param float $y - * @return float + * @param float $x + * @param float $y + * @return float */ public static function POWER($x = 0, $y = 2) { $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); @@ -703,17 +703,17 @@ class PHPExcel_Calculation_MathTrig { /** - * PRODUCT + * PRODUCT * - * PRODUCT returns the product of all the values and cells referenced in the argument list. + * PRODUCT returns the product of all the values and cells referenced in the argument list. * - * Excel Function: + * Excel Function: * PRODUCT(value1[,value2[, ...]]) * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Mathematical and Trigonometric Functions + * @param mixed $arg,... Data values + * @return float */ public static function PRODUCT() { // Return value @@ -740,18 +740,18 @@ class PHPExcel_Calculation_MathTrig { /** - * QUOTIENT + * QUOTIENT * - * QUOTIENT function returns the integer portion of a division. Numerator is the divided number + * QUOTIENT function returns the integer portion of a division. Numerator is the divided number * and denominator is the divisor. * - * Excel Function: + * Excel Function: * QUOTIENT(value1[,value2[, ...]]) * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Mathematical and Trigonometric Functions + * @param mixed $arg,... Data values + * @return float */ public static function QUOTIENT() { // Return value @@ -827,13 +827,13 @@ class PHPExcel_Calculation_MathTrig { /** - * ROUNDUP + * ROUNDUP * - * Rounds a number up to a specified number of decimal places + * Rounds a number up to a specified number of decimal places * - * @param float $number Number to round - * @param int $digits Number of digits to which you want to round $number - * @return float Rounded Number + * @param float $number Number to round + * @param int $digits Number of digits to which you want to round $number + * @return float Rounded Number */ public static function ROUNDUP($number,$digits) { $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); @@ -852,13 +852,13 @@ class PHPExcel_Calculation_MathTrig { /** - * ROUNDDOWN + * ROUNDDOWN * - * Rounds a number down to a specified number of decimal places + * Rounds a number down to a specified number of decimal places * - * @param float $number Number to round - * @param int $digits Number of digits to which you want to round $number - * @return float Rounded Number + * @param float $number Number to round + * @param int $digits Number of digits to which you want to round $number + * @return float Rounded Number */ public static function ROUNDDOWN($number,$digits) { $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); @@ -877,15 +877,15 @@ class PHPExcel_Calculation_MathTrig { /** - * SERIESSUM + * SERIESSUM * - * Returns the sum of a power series + * Returns the sum of a power series * - * @param float $x Input value to the power series - * @param float $n Initial power to which you want to raise $x - * @param float $m Step by which to increase $n for each term in the series - * @param array of mixed Data Series - * @return float + * @param float $x Input value to the power series + * @param float $n Initial power to which you want to raise $x + * @param float $m Step by which to increase $n for each term in the series + * @param array of mixed Data Series + * @return float */ public static function SERIESSUM() { // Return value @@ -917,13 +917,13 @@ class PHPExcel_Calculation_MathTrig { /** - * SIGN + * SIGN * - * Determines the sign of a number. Returns 1 if the number is positive, zero (0) - * if the number is 0, and -1 if the number is negative. + * Determines the sign of a number. Returns 1 if the number is positive, zero (0) + * if the number is 0, and -1 if the number is negative. * - * @param float $number Number to round - * @return int sign value + * @param float $number Number to round + * @return int sign value */ public static function SIGN($number) { $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); @@ -941,12 +941,12 @@ class PHPExcel_Calculation_MathTrig { /** - * SQRTPI + * SQRTPI * - * Returns the square root of (number * pi). + * Returns the square root of (number * pi). * - * @param float $number Number - * @return float Square Root of Number * Pi + * @param float $number Number + * @return float Square Root of Number * Pi */ public static function SQRTPI($number) { $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); @@ -962,14 +962,14 @@ class PHPExcel_Calculation_MathTrig { /** - * SUBTOTAL + * SUBTOTAL * - * Returns a subtotal in a list or database. + * Returns a subtotal in a list or database. * - * @param int the number 1 to 11 that specifies which function to + * @param int the number 1 to 11 that specifies which function to * use in calculating subtotals within a list. - * @param array of mixed Data Series - * @return float + * @param array of mixed Data Series + * @return float */ public static function SUBTOTAL() { $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); @@ -1019,17 +1019,17 @@ class PHPExcel_Calculation_MathTrig { /** - * SUM + * SUM * - * SUM computes the sum of all the values and cells referenced in the argument list. + * SUM computes the sum of all the values and cells referenced in the argument list. * - * Excel Function: + * Excel Function: * SUM(value1[,value2[, ...]]) * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Mathematical and Trigonometric Functions + * @param mixed $arg,... Data values + * @return float */ public static function SUM() { // Return value @@ -1049,18 +1049,18 @@ class PHPExcel_Calculation_MathTrig { /** - * SUMIF + * SUMIF * - * Counts the number of cells that contain numbers within the list of arguments + * Counts the number of cells that contain numbers within the list of arguments * - * Excel Function: + * Excel Function: * SUMIF(value1[,value2[, ...]],condition) * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @param string $condition The criteria that defines which cells will be summed. - * @return float + * @access public + * @category Mathematical and Trigonometric Functions + * @param mixed $arg,... Data values + * @param string $condition The criteria that defines which cells will be summed. + * @return float */ public static function SUMIF($aArgs,$condition,$sumArgs = array()) { // Return value @@ -1119,17 +1119,17 @@ class PHPExcel_Calculation_MathTrig { /** - * SUMSQ + * SUMSQ * - * SUMSQ returns the sum of the squares of the arguments + * SUMSQ returns the sum of the squares of the arguments * - * Excel Function: + * Excel Function: * SUMSQ(value1[,value2[, ...]]) * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Mathematical and Trigonometric Functions + * @param mixed $arg,... Data values + * @return float */ public static function SUMSQ() { // Return value @@ -1236,13 +1236,13 @@ class PHPExcel_Calculation_MathTrig { /** - * TRUNC + * TRUNC * - * Truncates value to the number of fractional digits by number_digits. + * Truncates value to the number of fractional digits by number_digits. * - * @param float $value - * @param int $digits - * @return float Truncated value + * @param float $value + * @param int $digits + * @return float Truncated value */ public static function TRUNC($value = 0, $digits = 0) { $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); diff --git a/Classes/PHPExcel/Calculation/Statistical.php b/Classes/PHPExcel/Calculation/Statistical.php index 58071c87..82643e82 100644 --- a/Classes/PHPExcel/Calculation/Statistical.php +++ b/Classes/PHPExcel/Calculation/Statistical.php @@ -140,11 +140,12 @@ class PHPExcel_Calculation_Statistical { private static $_logBetaCache_result = 0.0; /** - * The natural logarithm of the beta function. - * @param p require p>0 - * @param q require q>0 - * @return 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow - * @author Jaco van Kooten + * The natural logarithm of the beta function. + * + * @param p require p>0 + * @param q require q>0 + * @return 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow + * @author Jaco van Kooten */ private static function _logBeta($p, $q) { if ($p != self::$_logBetaCache_p || $q != self::$_logBetaCache_q) { @@ -161,9 +162,9 @@ class PHPExcel_Calculation_Statistical { /** - * Evaluates of continued fraction part of incomplete beta function. - * Based on an idea from Numerical Recipes (W.H. Press et al, 1992). - * @author Jaco van Kooten + * Evaluates of continued fraction part of incomplete beta function. + * Based on an idea from Numerical Recipes (W.H. Press et al, 1992). + * @author Jaco van Kooten */ private static function _betaFraction($x, $p, $q) { $c = 1.0; @@ -683,18 +684,18 @@ class PHPExcel_Calculation_Statistical { /** - * AVEDEV + * AVEDEV * - * Returns the average of the absolute deviations of data points from their mean. - * AVEDEV is a measure of the variability in a data set. + * Returns the average of the absolute deviations of data points from their mean. + * AVEDEV is a measure of the variability in a data set. * - * Excel Function: + * Excel Function: * AVEDEV(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function AVEDEV() { $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); @@ -732,17 +733,17 @@ class PHPExcel_Calculation_Statistical { /** - * AVERAGE + * AVERAGE * - * Returns the average (arithmetic mean) of the arguments + * Returns the average (arithmetic mean) of the arguments * - * Excel Function: + * Excel Function: * AVERAGE(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function AVERAGE() { $returnValue = $aCount = 0; @@ -774,17 +775,17 @@ class PHPExcel_Calculation_Statistical { /** - * AVERAGEA + * AVERAGEA * - * Returns the average of its arguments, including numbers, text, and logical values + * Returns the average of its arguments, including numbers, text, and logical values * - * Excel Function: + * Excel Function: * AVERAGEA(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function AVERAGEA() { // Return value @@ -822,18 +823,18 @@ class PHPExcel_Calculation_Statistical { /** - * AVERAGEIF + * AVERAGEIF * - * Returns the average value from a range of cells that contain numbers within the list of arguments + * Returns the average value from a range of cells that contain numbers within the list of arguments * - * Excel Function: + * Excel Function: * AVERAGEIF(value1[,value2[, ...]],condition) * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @param string $condition The criteria that defines which cells will be checked. - * @return float + * @access public + * @category Mathematical and Trigonometric Functions + * @param mixed $arg,... Data values + * @param string $condition The criteria that defines which cells will be checked. + * @return float */ public static function AVERAGEIF($aArgs,$condition,$averageArgs = array()) { // Return value @@ -956,21 +957,21 @@ class PHPExcel_Calculation_Statistical { /** - * BINOMDIST + * BINOMDIST * - * Returns the individual term binomial distribution probability. Use BINOMDIST in problems with - * a fixed number of tests or trials, when the outcomes of any trial are only success or failure, - * when trials are independent, and when the probability of success is constant throughout the - * experiment. For example, BINOMDIST can calculate the probability that two of the next three - * babies born are male. + * Returns the individual term binomial distribution probability. Use BINOMDIST in problems with + * a fixed number of tests or trials, when the outcomes of any trial are only success or failure, + * when trials are independent, and when the probability of success is constant throughout the + * experiment. For example, BINOMDIST can calculate the probability that two of the next three + * babies born are male. * - * @param float $value Number of successes in trials - * @param float $trials Number of trials - * @param float $probability Probability of success on each trial - * @param boolean $cumulative - * @return float + * @param float $value Number of successes in trials + * @param float $trials Number of trials + * @param float $probability Probability of success on each trial + * @param boolean $cumulative + * @return float * - * @todo Cumulative distribution function + * @todo Cumulative distribution function * */ public static function BINOMDIST($value, $trials, $probability, $cumulative) { @@ -1002,13 +1003,13 @@ class PHPExcel_Calculation_Statistical { /** - * CHIDIST + * CHIDIST * - * Returns the one-tailed probability of the chi-squared distribution. + * Returns the one-tailed probability of the chi-squared distribution. * - * @param float $value Value for the function - * @param float $degrees degrees of freedom - * @return float + * @param float $value Value for the function + * @param float $degrees degrees of freedom + * @return float */ public static function CHIDIST($value, $degrees) { $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); @@ -1031,13 +1032,13 @@ class PHPExcel_Calculation_Statistical { /** - * CHIINV + * CHIINV * - * Returns the one-tailed probability of the chi-squared distribution. + * Returns the one-tailed probability of the chi-squared distribution. * - * @param float $probability Probability for the function - * @param float $degrees degrees of freedom - * @return float + * @param float $probability Probability for the function + * @param float $degrees degrees of freedom + * @return float */ public static function CHIINV($probability, $degrees) { $probability = PHPExcel_Calculation_Functions::flattenSingleValue($probability); @@ -1116,13 +1117,13 @@ class PHPExcel_Calculation_Statistical { /** - * CORREL + * CORREL * - * Returns covariance, the average of the products of deviations for each data point pair. + * Returns covariance, the average of the products of deviations for each data point pair. * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float + * @param array of mixed Data Series Y + * @param array of mixed Data Series X + * @return float */ public static function CORREL($yValues,$xValues=null) { if ((is_null($xValues)) || (!is_array($yValues)) || (!is_array($xValues))) { @@ -1146,17 +1147,17 @@ class PHPExcel_Calculation_Statistical { /** - * COUNT + * COUNT * - * Counts the number of cells that contain numbers within the list of arguments + * Counts the number of cells that contain numbers within the list of arguments * - * Excel Function: + * Excel Function: * COUNT(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return int + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return int */ public static function COUNT() { // Return value @@ -1181,17 +1182,17 @@ class PHPExcel_Calculation_Statistical { /** - * COUNTA + * COUNTA * - * Counts the number of cells that are not empty within the list of arguments + * Counts the number of cells that are not empty within the list of arguments * - * Excel Function: + * Excel Function: * COUNTA(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return int + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return int */ public static function COUNTA() { // Return value @@ -1212,17 +1213,17 @@ class PHPExcel_Calculation_Statistical { /** - * COUNTBLANK + * COUNTBLANK * - * Counts the number of empty cells within the list of arguments + * Counts the number of empty cells within the list of arguments * - * Excel Function: + * Excel Function: * COUNTBLANK(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return int + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return int */ public static function COUNTBLANK() { // Return value @@ -1243,18 +1244,18 @@ class PHPExcel_Calculation_Statistical { /** - * COUNTIF + * COUNTIF * - * Counts the number of cells that contain numbers within the list of arguments + * Counts the number of cells that contain numbers within the list of arguments * - * Excel Function: + * Excel Function: * COUNTIF(value1[,value2[, ...]],condition) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @param string $condition The criteria that defines which cells will be counted. - * @return int + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @param string $condition The criteria that defines which cells will be counted. + * @return int */ public static function COUNTIF($aArgs,$condition) { // Return value @@ -1278,13 +1279,13 @@ class PHPExcel_Calculation_Statistical { /** - * COVAR + * COVAR * - * Returns covariance, the average of the products of deviations for each data point pair. + * Returns covariance, the average of the products of deviations for each data point pair. * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float + * @param array of mixed Data Series Y + * @param array of mixed Data Series X + * @return float */ public static function COVAR($yValues,$xValues) { if (!self::_checkTrendArrays($yValues,$xValues)) { @@ -1305,19 +1306,19 @@ class PHPExcel_Calculation_Statistical { /** - * CRITBINOM + * CRITBINOM * - * Returns the smallest value for which the cumulative binomial distribution is greater - * than or equal to a criterion value + * Returns the smallest value for which the cumulative binomial distribution is greater + * than or equal to a criterion value * - * See http://support.microsoft.com/kb/828117/ for details of the algorithm used + * See http://support.microsoft.com/kb/828117/ for details of the algorithm used * - * @param float $trials number of Bernoulli trials - * @param float $probability probability of a success on each trial - * @param float $alpha criterion value - * @return int + * @param float $trials number of Bernoulli trials + * @param float $probability probability of a success on each trial + * @param float $alpha criterion value + * @return int * - * @todo Warning. This implementation differs from the algorithm detailed on the MS + * @todo Warning. This implementation differs from the algorithm detailed on the MS * web site in that $CumPGuessMinus1 = $CumPGuess - 1 rather than $CumPGuess - $PGuess * This eliminates a potential endless loop error, but may have an adverse affect on the * accuracy of the function (although all my tests have so far returned correct results). @@ -1415,17 +1416,17 @@ class PHPExcel_Calculation_Statistical { /** - * DEVSQ + * DEVSQ * - * Returns the sum of squares of deviations of data points from their sample mean. + * Returns the sum of squares of deviations of data points from their sample mean. * - * Excel Function: + * Excel Function: * DEVSQ(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function DEVSQ() { $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); @@ -1464,16 +1465,16 @@ class PHPExcel_Calculation_Statistical { /** - * EXPONDIST + * EXPONDIST * - * Returns the exponential distribution. Use EXPONDIST to model the time between events, - * such as how long an automated bank teller takes to deliver cash. For example, you can - * use EXPONDIST to determine the probability that the process takes at most 1 minute. + * Returns the exponential distribution. Use EXPONDIST to model the time between events, + * such as how long an automated bank teller takes to deliver cash. For example, you can + * use EXPONDIST to determine the probability that the process takes at most 1 minute. * - * @param float $value Value of the function - * @param float $lambda The parameter value - * @param boolean $cumulative - * @return float + * @param float $value Value of the function + * @param float $lambda The parameter value + * @param boolean $cumulative + * @return float */ public static function EXPONDIST($value, $lambda, $cumulative) { $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); @@ -1497,14 +1498,14 @@ class PHPExcel_Calculation_Statistical { /** - * FISHER + * FISHER * - * Returns the Fisher transformation at x. This transformation produces a function that - * is normally distributed rather than skewed. Use this function to perform hypothesis - * testing on the correlation coefficient. + * Returns the Fisher transformation at x. This transformation produces a function that + * is normally distributed rather than skewed. Use this function to perform hypothesis + * testing on the correlation coefficient. * - * @param float $value - * @return float + * @param float $value + * @return float */ public static function FISHER($value) { $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); @@ -1520,14 +1521,14 @@ class PHPExcel_Calculation_Statistical { /** - * FISHERINV + * FISHERINV * - * Returns the inverse of the Fisher transformation. Use this transformation when - * analyzing correlations between ranges or arrays of data. If y = FISHER(x), then - * FISHERINV(y) = x. + * Returns the inverse of the Fisher transformation. Use this transformation when + * analyzing correlations between ranges or arrays of data. If y = FISHER(x), then + * FISHERINV(y) = x. * - * @param float $value - * @return float + * @param float $value + * @return float */ public static function FISHERINV($value) { $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); @@ -1540,14 +1541,14 @@ class PHPExcel_Calculation_Statistical { /** - * FORECAST + * FORECAST * - * Calculates, or predicts, a future value by using existing values. The predicted value is a y-value for a given x-value. + * Calculates, or predicts, a future value by using existing values. The predicted value is a y-value for a given x-value. * - * @param float Value of X for which we want to find Y - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float + * @param float Value of X for which we want to find Y + * @param array of mixed Data Series Y + * @param array of mixed Data Series X + * @return float */ public static function FORECAST($xValue,$yValues,$xValues) { $xValue = PHPExcel_Calculation_Functions::flattenSingleValue($xValue); @@ -1688,19 +1689,19 @@ class PHPExcel_Calculation_Statistical { /** - * GEOMEAN + * GEOMEAN * - * Returns the geometric mean of an array or range of positive data. For example, you + * Returns the geometric mean of an array or range of positive data. For example, you * can use GEOMEAN to calculate average growth rate given compound interest with * variable rates. * - * Excel Function: + * Excel Function: * GEOMEAN(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function GEOMEAN() { $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); @@ -1717,15 +1718,15 @@ class PHPExcel_Calculation_Statistical { /** - * GROWTH + * GROWTH * - * Returns values along a predicted emponential trend + * Returns values along a predicted emponential trend * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @param array of mixed Values of X for which we want to find Y - * @param boolean A logical value specifying whether to force the intersect to equal 0. - * @return array of float + * @param array of mixed Data Series Y + * @param array of mixed Data Series X + * @param array of mixed Values of X for which we want to find Y + * @param boolean A logical value specifying whether to force the intersect to equal 0. + * @return array of float */ public static function GROWTH($yValues,$xValues=array(),$newValues=array(),$const=True) { $yValues = PHPExcel_Calculation_Functions::flattenArray($yValues); @@ -1748,18 +1749,18 @@ class PHPExcel_Calculation_Statistical { /** - * HARMEAN + * HARMEAN * - * Returns the harmonic mean of a data set. The harmonic mean is the reciprocal of the + * Returns the harmonic mean of a data set. The harmonic mean is the reciprocal of the * arithmetic mean of reciprocals. * - * Excel Function: + * Excel Function: * HARMEAN(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function HARMEAN() { // Return value @@ -1833,13 +1834,13 @@ class PHPExcel_Calculation_Statistical { /** - * INTERCEPT + * INTERCEPT * - * Calculates the point at which a line will intersect the y-axis by using existing x-values and y-values. + * Calculates the point at which a line will intersect the y-axis by using existing x-values and y-values. * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float + * @param array of mixed Data Series Y + * @param array of mixed Data Series X + * @return float */ public static function INTERCEPT($yValues,$xValues) { if (!self::_checkTrendArrays($yValues,$xValues)) { @@ -1900,19 +1901,19 @@ class PHPExcel_Calculation_Statistical { /** - * LARGE + * LARGE * - * Returns the nth largest value in a data set. You can use this function to + * Returns the nth largest value in a data set. You can use this function to * select a value based on its relative standing. * - * Excel Function: + * Excel Function: * LARGE(value1[,value2[, ...]],entry) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @param int $entry Position (ordered from the largest) in the array or range of data to return - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @param int $entry Position (ordered from the largest) in the array or range of data to return + * @return float * */ public static function LARGE() { @@ -1942,16 +1943,16 @@ class PHPExcel_Calculation_Statistical { /** - * LINEST + * LINEST * - * Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data, + * Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data, * and then returns an array that describes the line. * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @param boolean A logical value specifying whether to force the intersect to equal 0. - * @param boolean A logical value specifying whether to return additional regression statistics. - * @return array + * @param array of mixed Data Series Y + * @param array of mixed Data Series X + * @param boolean A logical value specifying whether to force the intersect to equal 0. + * @param boolean A logical value specifying whether to return additional regression statistics. + * @return array */ public static function LINEST($yValues,$xValues=null,$const=True,$stats=False) { $const = (is_null($const)) ? True : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($const); @@ -1995,16 +1996,16 @@ class PHPExcel_Calculation_Statistical { /** - * LOGEST + * LOGEST * - * Calculates an exponential curve that best fits the X and Y data series, + * Calculates an exponential curve that best fits the X and Y data series, * and then returns an array that describes the line. * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @param boolean A logical value specifying whether to force the intersect to equal 0. - * @param boolean A logical value specifying whether to return additional regression statistics. - * @return array + * @param array of mixed Data Series Y + * @param array of mixed Data Series X + * @param boolean A logical value specifying whether to force the intersect to equal 0. + * @param boolean A logical value specifying whether to return additional regression statistics. + * @return array */ public static function LOGEST($yValues,$xValues=null,$const=True,$stats=False) { $const = (is_null($const)) ? True : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($const); @@ -2105,18 +2106,18 @@ class PHPExcel_Calculation_Statistical { /** - * MAX + * MAX * - * MAX returns the value of the element of the values passed that has the highest value, + * MAX returns the value of the element of the values passed that has the highest value, * with negative numbers considered smaller than positive numbers. * - * Excel Function: + * Excel Function: * MAX(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function MAX() { // Return value @@ -2142,17 +2143,17 @@ class PHPExcel_Calculation_Statistical { /** - * MAXA + * MAXA * - * Returns the greatest value in a list of arguments, including numbers, text, and logical values + * Returns the greatest value in a list of arguments, including numbers, text, and logical values * - * Excel Function: + * Excel Function: * MAXA(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function MAXA() { // Return value @@ -2183,18 +2184,18 @@ class PHPExcel_Calculation_Statistical { /** - * MAXIF + * MAXIF * - * Counts the maximum value within a range of cells that contain numbers within the list of arguments + * Counts the maximum value within a range of cells that contain numbers within the list of arguments * - * Excel Function: + * Excel Function: * MAXIF(value1[,value2[, ...]],condition) * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @param string $condition The criteria that defines which cells will be checked. - * @return float + * @access public + * @category Mathematical and Trigonometric Functions + * @param mixed $arg,... Data values + * @param string $condition The criteria that defines which cells will be checked. + * @return float */ public static function MAXIF($aArgs,$condition,$sumArgs = array()) { // Return value @@ -2223,17 +2224,17 @@ class PHPExcel_Calculation_Statistical { /** - * MEDIAN + * MEDIAN * - * Returns the median of the given numbers. The median is the number in the middle of a set of numbers. + * Returns the median of the given numbers. The median is the number in the middle of a set of numbers. * - * Excel Function: + * Excel Function: * MEDIAN(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function MEDIAN() { // Return value @@ -2267,18 +2268,18 @@ class PHPExcel_Calculation_Statistical { /** - * MIN + * MIN * - * MIN returns the value of the element of the values passed that has the smallest value, + * MIN returns the value of the element of the values passed that has the smallest value, * with negative numbers considered smaller than positive numbers. * - * Excel Function: + * Excel Function: * MIN(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function MIN() { // Return value @@ -2304,17 +2305,17 @@ class PHPExcel_Calculation_Statistical { /** - * MINA + * MINA * - * Returns the smallest value in a list of arguments, including numbers, text, and logical values + * Returns the smallest value in a list of arguments, including numbers, text, and logical values * - * Excel Function: + * Excel Function: * MINA(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function MINA() { // Return value @@ -2345,18 +2346,18 @@ class PHPExcel_Calculation_Statistical { /** - * MINIF + * MINIF * - * Returns the minimum value within a range of cells that contain numbers within the list of arguments + * Returns the minimum value within a range of cells that contain numbers within the list of arguments * - * Excel Function: + * Excel Function: * MINIF(value1[,value2[, ...]],condition) * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @param string $condition The criteria that defines which cells will be checked. - * @return float + * @access public + * @category Mathematical and Trigonometric Functions + * @param mixed $arg,... Data values + * @param string $condition The criteria that defines which cells will be checked. + * @return float */ public static function MINIF($aArgs,$condition,$sumArgs = array()) { // Return value @@ -2419,17 +2420,17 @@ class PHPExcel_Calculation_Statistical { /** - * MODE + * MODE * - * Returns the most frequently occurring, or repetitive, value in an array or range of data + * Returns the most frequently occurring, or repetitive, value in an array or range of data * - * Excel Function: + * Excel Function: * MODE(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function MODE() { // Return value @@ -2456,18 +2457,18 @@ class PHPExcel_Calculation_Statistical { /** - * NEGBINOMDIST + * NEGBINOMDIST * - * Returns the negative binomial distribution. NEGBINOMDIST returns the probability that - * there will be number_f failures before the number_s-th success, when the constant - * probability of a success is probability_s. This function is similar to the binomial - * distribution, except that the number of successes is fixed, and the number of trials is - * variable. Like the binomial, trials are assumed to be independent. + * Returns the negative binomial distribution. NEGBINOMDIST returns the probability that + * there will be number_f failures before the number_s-th success, when the constant + * probability of a success is probability_s. This function is similar to the binomial + * distribution, except that the number of successes is fixed, and the number of trials is + * variable. Like the binomial, trials are assumed to be independent. * - * @param float $failures Number of Failures - * @param float $successes Threshold number of Successes - * @param float $probability Probability of success on each trial - * @return float + * @param float $failures Number of Failures + * @param float $successes Threshold number of Successes + * @param float $probability Probability of success on each trial + * @return float * */ public static function NEGBINOMDIST($failures, $successes, $probability) { @@ -2588,18 +2589,18 @@ class PHPExcel_Calculation_Statistical { /** - * PERCENTILE + * PERCENTILE * - * Returns the nth percentile of values in a range.. + * Returns the nth percentile of values in a range.. * - * Excel Function: + * Excel Function: * PERCENTILE(value1[,value2[, ...]],entry) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @param float $entry Percentile value in the range 0..1, inclusive. - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @param float $entry Percentile value in the range 0..1, inclusive. + * @return float */ public static function PERCENTILE() { $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); @@ -2638,14 +2639,14 @@ class PHPExcel_Calculation_Statistical { /** - * PERCENTRANK + * PERCENTRANK * - * Returns the rank of a value in a data set as a percentage of the data set. + * Returns the rank of a value in a data set as a percentage of the data set. * - * @param array of number An array of, or a reference to, a list of numbers. - * @param number The number whose rank you want to find. - * @param number The number of significant digits for the returned percentage value. - * @return float + * @param array of number An array of, or a reference to, a list of numbers. + * @param number The number whose rank you want to find. + * @param number The number of significant digits for the returned percentage value. + * @return float */ public static function PERCENTRANK($valueSet,$value,$significance=3) { $valueSet = PHPExcel_Calculation_Functions::flattenArray($valueSet); @@ -2684,17 +2685,17 @@ class PHPExcel_Calculation_Statistical { /** - * PERMUT + * PERMUT * - * Returns the number of permutations for a given number of objects that can be - * selected from number objects. A permutation is any set or subset of objects or - * events where internal order is significant. Permutations are different from - * combinations, for which the internal order is not significant. Use this function - * for lottery-style probability calculations. + * Returns the number of permutations for a given number of objects that can be + * selected from number objects. A permutation is any set or subset of objects or + * events where internal order is significant. Permutations are different from + * combinations, for which the internal order is not significant. Use this function + * for lottery-style probability calculations. * - * @param int $numObjs Number of different objects - * @param int $numInSet Number of objects in each permutation - * @return int Number of permutations + * @param int $numObjs Number of different objects + * @param int $numInSet Number of objects in each permutation + * @return int Number of permutations */ public static function PERMUT($numObjs,$numInSet) { $numObjs = PHPExcel_Calculation_Functions::flattenSingleValue($numObjs); @@ -2749,18 +2750,18 @@ class PHPExcel_Calculation_Statistical { /** - * QUARTILE + * QUARTILE * - * Returns the quartile of a data set. + * Returns the quartile of a data set. * - * Excel Function: + * Excel Function: * QUARTILE(value1[,value2[, ...]],entry) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @param int $entry Quartile value in the range 1..3, inclusive. - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @param int $entry Quartile value in the range 1..3, inclusive. + * @return float */ public static function QUARTILE() { $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); @@ -2780,14 +2781,14 @@ class PHPExcel_Calculation_Statistical { /** - * RANK + * RANK * - * Returns the rank of a number in a list of numbers. + * Returns the rank of a number in a list of numbers. * - * @param number The number whose rank you want to find. - * @param array of number An array of, or a reference to, a list of numbers. - * @param mixed Order to sort the values in the value set - * @return float + * @param number The number whose rank you want to find. + * @param array of number An array of, or a reference to, a list of numbers. + * @param mixed Order to sort the values in the value set + * @return float */ public static function RANK($value,$valueSet,$order=0) { $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); @@ -2815,13 +2816,13 @@ class PHPExcel_Calculation_Statistical { /** - * RSQ + * RSQ * - * Returns the square of the Pearson product moment correlation coefficient through data points in known_y's and known_x's. + * Returns the square of the Pearson product moment correlation coefficient through data points in known_y's and known_x's. * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float + * @param array of mixed Data Series Y + * @param array of mixed Data Series X + * @return float */ public static function RSQ($yValues,$xValues) { if (!self::_checkTrendArrays($yValues,$xValues)) { @@ -2880,13 +2881,13 @@ class PHPExcel_Calculation_Statistical { /** - * SLOPE + * SLOPE * - * Returns the slope of the linear regression line through data points in known_y's and known_x's. + * Returns the slope of the linear regression line through data points in known_y's and known_x's. * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float + * @param array of mixed Data Series Y + * @param array of mixed Data Series X + * @return float */ public static function SLOPE($yValues,$xValues) { if (!self::_checkTrendArrays($yValues,$xValues)) { @@ -2907,19 +2908,19 @@ class PHPExcel_Calculation_Statistical { /** - * SMALL + * SMALL * - * Returns the nth smallest value in a data set. You can use this function to + * Returns the nth smallest value in a data set. You can use this function to * select a value based on its relative standing. * - * Excel Function: + * Excel Function: * SMALL(value1[,value2[, ...]],entry) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @param int $entry Position (ordered from the smallest) in the array or range of data to return - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @param int $entry Position (ordered from the smallest) in the array or range of data to return + * @return float */ public static function SMALL() { $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); @@ -2948,14 +2949,14 @@ class PHPExcel_Calculation_Statistical { /** - * STANDARDIZE + * STANDARDIZE * - * Returns a normalized value from a distribution characterized by mean and standard_dev. + * Returns a normalized value from a distribution characterized by mean and standard_dev. * - * @param float $value Value to normalize - * @param float $mean Mean Value - * @param float $stdDev Standard Deviation - * @return float Standardized value + * @param float $value Value to normalize + * @param float $mean Mean Value + * @param float $stdDev Standard Deviation + * @return float Standardized value */ public static function STANDARDIZE($value,$mean,$stdDev) { $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); @@ -2973,18 +2974,18 @@ class PHPExcel_Calculation_Statistical { /** - * STDEV + * STDEV * - * Estimates standard deviation based on a sample. The standard deviation is a measure of how - * widely values are dispersed from the average value (the mean). + * Estimates standard deviation based on a sample. The standard deviation is a measure of how + * widely values are dispersed from the average value (the mean). * - * Excel Function: + * Excel Function: * STDEV(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function STDEV() { $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); @@ -3021,17 +3022,17 @@ class PHPExcel_Calculation_Statistical { /** - * STDEVA + * STDEVA * - * Estimates standard deviation based on a sample, including numbers, text, and logical values + * Estimates standard deviation based on a sample, including numbers, text, and logical values * - * Excel Function: + * Excel Function: * STDEVA(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function STDEVA() { $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); @@ -3073,17 +3074,17 @@ class PHPExcel_Calculation_Statistical { /** - * STDEVP + * STDEVP * - * Calculates standard deviation based on the entire population + * Calculates standard deviation based on the entire population * - * Excel Function: + * Excel Function: * STDEVP(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function STDEVP() { $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); @@ -3120,17 +3121,17 @@ class PHPExcel_Calculation_Statistical { /** - * STDEVPA + * STDEVPA * - * Calculates standard deviation based on the entire population, including numbers, text, and logical values + * Calculates standard deviation based on the entire population, including numbers, text, and logical values * - * Excel Function: + * Excel Function: * STDEVPA(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function STDEVPA() { $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); @@ -3172,13 +3173,13 @@ class PHPExcel_Calculation_Statistical { /** - * STEYX + * STEYX * - * Returns the standard error of the predicted y-value for each x in the regression. + * Returns the standard error of the predicted y-value for each x in the regression. * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float + * @param array of mixed Data Series Y + * @param array of mixed Data Series X + * @return float */ public static function STEYX($yValues,$xValues) { if (!self::_checkTrendArrays($yValues,$xValues)) { @@ -3315,15 +3316,15 @@ class PHPExcel_Calculation_Statistical { /** - * TREND + * TREND * - * Returns values along a linear trend + * Returns values along a linear trend * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @param array of mixed Values of X for which we want to find Y - * @param boolean A logical value specifying whether to force the intersect to equal 0. - * @return array of float + * @param array of mixed Data Series Y + * @param array of mixed Data Series X + * @param array of mixed Values of X for which we want to find Y + * @param boolean A logical value specifying whether to force the intersect to equal 0. + * @return array of float */ public static function TREND($yValues,$xValues=array(),$newValues=array(),$const=True) { $yValues = PHPExcel_Calculation_Functions::flattenArray($yValues); @@ -3346,20 +3347,20 @@ class PHPExcel_Calculation_Statistical { /** - * TRIMMEAN + * TRIMMEAN * - * Returns the mean of the interior of a data set. TRIMMEAN calculates the mean - * taken by excluding a percentage of data points from the top and bottom tails - * of a data set. + * Returns the mean of the interior of a data set. TRIMMEAN calculates the mean + * taken by excluding a percentage of data points from the top and bottom tails + * of a data set. * - * Excel Function: + * Excel Function: * TRIMEAN(value1[,value2[, ...]],$discard) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @param float $discard Percentage to discard - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @param float $discard Percentage to discard + * @return float */ public static function TRIMMEAN() { $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); @@ -3391,17 +3392,17 @@ class PHPExcel_Calculation_Statistical { /** - * VARFunc + * VARFunc * - * Estimates variance based on a sample. + * Estimates variance based on a sample. * - * Excel Function: + * Excel Function: * VAR(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function VARFunc() { // Return value @@ -3433,17 +3434,17 @@ class PHPExcel_Calculation_Statistical { /** - * VARA + * VARA * - * Estimates variance based on a sample, including numbers, text, and logical values + * Estimates variance based on a sample, including numbers, text, and logical values * - * Excel Function: + * Excel Function: * VARA(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function VARA() { // Return value @@ -3486,17 +3487,17 @@ class PHPExcel_Calculation_Statistical { /** - * VARP + * VARP * - * Calculates variance based on the entire population + * Calculates variance based on the entire population * - * Excel Function: + * Excel Function: * VARP(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function VARP() { // Return value @@ -3528,17 +3529,17 @@ class PHPExcel_Calculation_Statistical { /** - * VARPA + * VARPA * - * Calculates variance based on the entire population, including numbers, text, and logical values + * Calculates variance based on the entire population, including numbers, text, and logical values * - * Excel Function: + * Excel Function: * VARPA(value1[,value2[, ...]]) * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float + * @access public + * @category Statistical Functions + * @param mixed $arg,... Data values + * @return float */ public static function VARPA() { // Return value diff --git a/Classes/PHPExcel/Calculation/TextData.php b/Classes/PHPExcel/Calculation/TextData.php index b319adca..aceafc63 100644 --- a/Classes/PHPExcel/Calculation/TextData.php +++ b/Classes/PHPExcel/Calculation/TextData.php @@ -87,10 +87,10 @@ class PHPExcel_Calculation_TextData { /** - * TRIMNONPRINTABLE + * TRIMNONPRINTABLE * - * @param mixed $value Value to check - * @return string + * @param mixed $value Value to check + * @return string */ public static function TRIMNONPRINTABLE($stringValue = '') { $stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue); @@ -111,10 +111,10 @@ class PHPExcel_Calculation_TextData { /** - * TRIMSPACES + * TRIMSPACES * - * @param mixed $value Value to check - * @return string + * @param mixed $value Value to check + * @return string */ public static function TRIMSPACES($stringValue = '') { $stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue); @@ -187,16 +187,16 @@ class PHPExcel_Calculation_TextData { /** - * DOLLAR + * DOLLAR * - * This function converts a number to text using currency format, with the decimals rounded to the specified place. - * The format used is $#,##0.00_);($#,##0.00).. + * This function converts a number to text using currency format, with the decimals rounded to the specified place. + * The format used is $#,##0.00_);($#,##0.00).. * - * @param float $value The value to format - * @param int $decimals The number of digits to display to the right of the decimal point. + * @param float $value The value to format + * @param int $decimals The number of digits to display to the right of the decimal point. * If decimals is negative, number is rounded to the left of the decimal point. * If you omit decimals, it is assumed to be 2 - * @return string + * @return string */ public static function DOLLAR($value = 0, $decimals = 2) { $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); @@ -288,10 +288,10 @@ class PHPExcel_Calculation_TextData { /** - * FIXEDFORMAT + * FIXEDFORMAT * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function FIXEDFORMAT($value, $decimals = 2, $no_commas = FALSE) { $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); @@ -342,12 +342,12 @@ class PHPExcel_Calculation_TextData { /** - * MID + * MID * - * @param string $value Value - * @param int $start Start character - * @param int $chars Number of characters - * @return string + * @param string $value Value + * @param int $start Start character + * @param int $chars Number of characters + * @return string */ public static function MID($value = '', $start = 1, $chars = null) { $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); @@ -371,11 +371,11 @@ class PHPExcel_Calculation_TextData { /** - * RIGHT + * RIGHT * - * @param string $value Value - * @param int $chars Number of characters - * @return string + * @param string $value Value + * @param int $chars Number of characters + * @return string */ public static function RIGHT($value = '', $chars = 1) { $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); @@ -420,12 +420,12 @@ class PHPExcel_Calculation_TextData { /** - * LOWERCASE + * LOWERCASE * - * Converts a string value to upper case. + * Converts a string value to upper case. * - * @param string $mixedCaseString - * @return string + * @param string $mixedCaseString + * @return string */ public static function LOWERCASE($mixedCaseString) { $mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString); @@ -443,12 +443,12 @@ class PHPExcel_Calculation_TextData { /** - * UPPERCASE + * UPPERCASE * - * Converts a string value to upper case. + * Converts a string value to upper case. * - * @param string $mixedCaseString - * @return string + * @param string $mixedCaseString + * @return string */ public static function UPPERCASE($mixedCaseString) { $mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString); @@ -466,12 +466,12 @@ class PHPExcel_Calculation_TextData { /** - * PROPERCASE + * PROPERCASE * - * Converts a string value to upper case. + * Converts a string value to upper case. * - * @param string $mixedCaseString - * @return string + * @param string $mixedCaseString + * @return string */ public static function PROPERCASE($mixedCaseString) { $mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString); @@ -489,12 +489,12 @@ class PHPExcel_Calculation_TextData { /** - * REPLACE + * REPLACE * - * @param string $value Value - * @param int $start Start character - * @param int $chars Number of characters - * @return string + * @param string $value Value + * @param int $start Start character + * @param int $chars Number of characters + * @return string */ public static function REPLACE($oldText = '', $start = 1, $chars = null, $newText) { $oldText = PHPExcel_Calculation_Functions::flattenSingleValue($oldText); @@ -510,13 +510,13 @@ class PHPExcel_Calculation_TextData { /** - * SUBSTITUTE + * SUBSTITUTE * - * @param string $text Value - * @param string $fromText From Value - * @param string $toText To Value - * @param integer $instance Instance Number - * @return string + * @param string $text Value + * @param string $fromText From Value + * @param string $toText To Value + * @param integer $instance Instance Number + * @return string */ public static function SUBSTITUTE($text = '', $fromText = '', $toText = '', $instance = 0) { $text = PHPExcel_Calculation_Functions::flattenSingleValue($text); @@ -557,10 +557,10 @@ class PHPExcel_Calculation_TextData { /** - * RETURNSTRING + * RETURNSTRING * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function RETURNSTRING($testValue = '') { $testValue = PHPExcel_Calculation_Functions::flattenSingleValue($testValue); @@ -573,10 +573,10 @@ class PHPExcel_Calculation_TextData { /** - * TEXTFORMAT + * TEXTFORMAT * - * @param mixed $value Value to check - * @return boolean + * @param mixed $value Value to check + * @return boolean */ public static function TEXTFORMAT($value,$format) { $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); diff --git a/Classes/PHPExcel/Chart/DataSeriesValues.php b/Classes/PHPExcel/Chart/DataSeriesValues.php index f07418a9..f4f229ae 100644 --- a/Classes/PHPExcel/Chart/DataSeriesValues.php +++ b/Classes/PHPExcel/Chart/DataSeriesValues.php @@ -37,49 +37,49 @@ class PHPExcel_Chart_DataSeriesValues { /** - * Series Data Type + * Series Data Type * - * @var string + * @var string */ private $_dataType = null; /** - * Series Data Source + * Series Data Source * - * @var string + * @var string */ private $_dataSource = null; /** - * Format Code + * Format Code * - * @var string + * @var string */ private $_formatCode = null; /** - * Series Point Marker + * Series Point Marker * - * @var string + * @var string */ private $_marker = null; /** - * Point Count (The number of datapoints in the dataseries) + * Point Count (The number of datapoints in the dataseries) * - * @var integer + * @var integer */ private $_pointCount = 0; /** - * Data Values + * Data Values * - * @var array of mixed + * @var array of mixed */ private $_dataValues = array(); /** - * Create a new PHPExcel_Chart_DataSeriesValues object + * Create a new PHPExcel_Chart_DataSeriesValues object */ public function __construct($dataType = null, $dataSource = null, $formatCode = null, $pointCount = 0, $dataValues = array(), $marker = null) { @@ -92,19 +92,19 @@ class PHPExcel_Chart_DataSeriesValues } /** - * Get Series Data Type + * Get Series Data Type * - * @return string + * @return string */ public function getDataType() { return $this->_dataType; } /** - * Set Series Data Type + * Set Series Data Type * - * @param string $dataType - * @return PHPExcel_Chart_DataSeriesValues + * @param string $dataType + * @return PHPExcel_Chart_DataSeriesValues */ public function setDataType($dataType = 'Number') { $this->_dataType = $dataType; @@ -113,19 +113,19 @@ class PHPExcel_Chart_DataSeriesValues } /** - * Get Series Data Source (formula) + * Get Series Data Source (formula) * - * @return string + * @return string */ public function getDataSource() { return $this->_dataSource; } /** - * Set Series Data Source (formula) + * Set Series Data Source (formula) * - * @param string $dataSource - * @return PHPExcel_Chart_DataSeriesValues + * @param string $dataSource + * @return PHPExcel_Chart_DataSeriesValues */ public function setDataSource($dataSource = null, $refreshDataValues = true) { $this->_dataSource = $dataSource; @@ -138,19 +138,19 @@ class PHPExcel_Chart_DataSeriesValues } /** - * Get Point Marker + * Get Point Marker * - * @return string + * @return string */ public function getPointMarker() { return $this->_marker; } /** - * Set Point Marker + * Set Point Marker * - * @param string $marker - * @return PHPExcel_Chart_DataSeriesValues + * @param string $marker + * @return PHPExcel_Chart_DataSeriesValues */ public function setPointMarker($marker = null) { $this->_marker = $marker; @@ -159,19 +159,19 @@ class PHPExcel_Chart_DataSeriesValues } /** - * Get Series Format Code + * Get Series Format Code * - * @return string + * @return string */ public function getFormatCode() { return $this->_formatCode; } /** - * Set Series Format Code + * Set Series Format Code * - * @param string $formatCode - * @return PHPExcel_Chart_DataSeriesValues + * @param string $formatCode + * @return PHPExcel_Chart_DataSeriesValues */ public function setFormatCode($formatCode = null) { $this->_formatCode = $formatCode; @@ -180,18 +180,18 @@ class PHPExcel_Chart_DataSeriesValues } /** - * Get Series Point Count + * Get Series Point Count * - * @return integer + * @return integer */ public function getPointCount() { return $this->_pointCount; } /** - * Identify if the Data Series is a multi-level or a simple series + * Identify if the Data Series is a multi-level or a simple series * - * @return boolean + * @return boolean */ public function isMultiLevelSeries() { if (count($this->_dataValues) > 0) { @@ -201,9 +201,9 @@ class PHPExcel_Chart_DataSeriesValues } /** - * Identify if the Data Series is a multi-level or a simple series + * Return the level count of a multi-level Data Series * - * @return boolean + * @return boolean */ public function multiLevelCount() { $levelCount = 0; @@ -214,18 +214,18 @@ class PHPExcel_Chart_DataSeriesValues } /** - * Get Series Data Values + * Get Series Data Values * - * @return array of mixed + * @return array of mixed */ public function getDataValues() { return $this->_dataValues; } /** - * Get the first Series Data value + * Get the first Series Data value * - * @return mixed + * @return mixed */ public function getDataValue() { $count = count($this->_dataValues); @@ -238,13 +238,13 @@ class PHPExcel_Chart_DataSeriesValues } /** - * Set Series Data Values + * Set Series Data Values * - * @param array $dataValues - * @param boolean $refreshDataSource + * @param array $dataValues + * @param boolean $refreshDataSource * TRUE - refresh the value of _dataSource based on the values of $dataValues * FALSE - don't change the value of _dataSource - * @return PHPExcel_Chart_DataSeriesValues + * @return PHPExcel_Chart_DataSeriesValues */ public function setDataValues($dataValues = array(), $refreshDataSource = true) { $this->_dataValues = PHPExcel_Calculation_Functions::flattenArray($dataValues); diff --git a/Classes/PHPExcel/Chart/Legend.php b/Classes/PHPExcel/Chart/Legend.php index 6825299d..5e914aae 100644 --- a/Classes/PHPExcel/Chart/Legend.php +++ b/Classes/PHPExcel/Chart/Legend.php @@ -58,23 +58,23 @@ class PHPExcel_Chart_Legend ); /** - * Legend position + * Legend position * - * @var string + * @var string */ private $_position = self::POSITION_RIGHT; /** - * Allow overlay of other elements? + * Allow overlay of other elements? * - * @var boolean + * @var boolean */ private $_overlay = true; /** - * Legend Layout + * Legend Layout * - * @var PHPExcel_Chart_Layout + * @var PHPExcel_Chart_Layout */ private $_layout = null; @@ -90,18 +90,18 @@ class PHPExcel_Chart_Legend } /** - * Get legend position as an excel string value + * Get legend position as an excel string value * - * @return string + * @return string */ public function getPosition() { return $this->_position; } /** - * Get legend position using an excel string value + * Get legend position using an excel string value * - * @param string $position + * @param string $position */ public function setPosition($position = self::POSITION_RIGHT) { if (!in_array($position,self::$positionXref)) { @@ -114,18 +114,18 @@ class PHPExcel_Chart_Legend } /** - * Get legend position as an Excel internal numeric value + * Get legend position as an Excel internal numeric value * - * @return number + * @return number */ public function getPositionXL() { return array_search($this->_position,self::$positionXref); } /** - * Set legend position using an Excel internal numeric value + * Set legend position using an Excel internal numeric value * - * @param number $positionXL + * @param number $positionXL */ public function setPositionXL($positionXL = self::xlLegendPositionRight) { if (!array_key_exists($positionXL,self::$positionXref)) { @@ -137,27 +137,27 @@ class PHPExcel_Chart_Legend } /** - * Get allow overlay of other elements? + * Get allow overlay of other elements? * - * @return boolean + * @return boolean */ public function getOverlay() { return $this->_overlay; } /** - * Set allow overlay of other elements? + * Set allow overlay of other elements? * - * @param boolean $value + * @param boolean $value */ public function setOverlay($value=false) { $this->_overlay = $value; } /** - * Get Layout + * Get Layout * - * @return PHPExcel_Chart_Layout + * @return PHPExcel_Chart_Layout */ public function getLayout() { return $this->_layout; diff --git a/Classes/PHPExcel/DocumentProperties.php b/Classes/PHPExcel/DocumentProperties.php index 7a1592a0..6bde10fc 100644 --- a/Classes/PHPExcel/DocumentProperties.php +++ b/Classes/PHPExcel/DocumentProperties.php @@ -1,28 +1,28 @@ 'IWriter', 'path' => 'PHPExcel/Writer/{0}.php', 'class' => 'PHPExcel_Writer_{0}' ), @@ -57,11 +57,11 @@ class PHPExcel_IOFactory ); /** - * Autoresolve classes + * Autoresolve classes * - * @var array - * @access private - * @static + * @var array + * @access private + * @static */ private static $_autoResolveClasses = array( 'Excel2007', @@ -79,23 +79,23 @@ class PHPExcel_IOFactory private function __construct() { } /** - * Get search locations + * Get search locations * - * @static - * @access public - * @return array + * @static + * @access public + * @return array */ public static function getSearchLocations() { return self::$_searchLocations; } // function getSearchLocations() /** - * Set search locations + * Set search locations * - * @static - * @access public - * @param array $value - * @throws Exception + * @static + * @access public + * @param array $value + * @throws Exception */ public static function setSearchLocations($value) { if (is_array($value)) { @@ -106,27 +106,27 @@ class PHPExcel_IOFactory } // function setSearchLocations() /** - * Add search location + * Add search location * - * @static - * @access public - * @param string $type Example: IWriter - * @param string $location Example: PHPExcel/Writer/{0}.php - * @param string $classname Example: PHPExcel_Writer_{0} + * @static + * @access public + * @param string $type Example: IWriter + * @param string $location Example: PHPExcel/Writer/{0}.php + * @param string $classname Example: PHPExcel_Writer_{0} */ public static function addSearchLocation($type = '', $location = '', $classname = '') { self::$_searchLocations[] = array( 'type' => $type, 'path' => $location, 'class' => $classname ); } // function addSearchLocation() /** - * Create PHPExcel_Writer_IWriter + * Create PHPExcel_Writer_IWriter * - * @static - * @access public - * @param PHPExcel $phpExcel - * @param string $writerType Example: Excel2007 - * @return PHPExcel_Writer_IWriter - * @throws Exception + * @static + * @access public + * @param PHPExcel $phpExcel + * @param string $writerType Example: Excel2007 + * @return PHPExcel_Writer_IWriter + * @throws Exception */ public static function createWriter(PHPExcel $phpExcel, $writerType = '') { // Search type @@ -150,13 +150,13 @@ class PHPExcel_IOFactory } // function createWriter() /** - * Create PHPExcel_Reader_IReader + * Create PHPExcel_Reader_IReader * - * @static - * @access public - * @param string $readerType Example: Excel2007 - * @return PHPExcel_Reader_IReader - * @throws Exception + * @static + * @access public + * @param string $readerType Example: Excel2007 + * @return PHPExcel_Reader_IReader + * @throws Exception */ public static function createReader($readerType = '') { // Search type @@ -180,13 +180,13 @@ class PHPExcel_IOFactory } // function createReader() /** - * Loads PHPExcel from file using automatic PHPExcel_Reader_IReader resolution + * Loads PHPExcel from file using automatic PHPExcel_Reader_IReader resolution * - * @static - * @access public - * @param string $pFileName - * @return PHPExcel - * @throws Exception + * @static + * @access public + * @param string $pFileName + * @return PHPExcel + * @throws Exception */ public static function load($pFilename) { $reader = self::createReaderForFile($pFilename); @@ -194,13 +194,13 @@ class PHPExcel_IOFactory } // function load() /** - * Identify file type using automatic PHPExcel_Reader_IReader resolution + * Identify file type using automatic PHPExcel_Reader_IReader resolution * - * @static - * @access public - * @param string $pFileName - * @return string - * @throws Exception + * @static + * @access public + * @param string $pFileName + * @return string + * @throws Exception */ public static function identify($pFilename) { $reader = self::createReaderForFile($pFilename); @@ -211,13 +211,13 @@ class PHPExcel_IOFactory } // 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 * - * @static - * @access public - * @param string $pFileName - * @return PHPExcel_Reader_IReader - * @throws Exception + * @static + * @access public + * @param string $pFileName + * @return PHPExcel_Reader_IReader + * @throws Exception */ public static function createReaderForFile($pFilename) { diff --git a/Classes/PHPExcel/Reader/CSV.php b/Classes/PHPExcel/Reader/CSV.php index 11dce594..127d4c08 100644 --- a/Classes/PHPExcel/Reader/CSV.php +++ b/Classes/PHPExcel/Reader/CSV.php @@ -45,84 +45,84 @@ if (!defined('PHPEXCEL_ROOT')) { class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader { /** - * Input encoding + * Input encoding * - * @access private - * @var string + * @access private + * @var string */ private $_inputEncoding = 'UTF-8'; /** - * Delimiter + * Delimiter * - * @access private - * @var string + * @access private + * @var string */ private $_delimiter = ','; /** - * Enclosure + * Enclosure * - * @access private - * @var string + * @access private + * @var string */ private $_enclosure = '"'; /** - * Line ending + * Line ending * - * @access private - * @var string + * @access private + * @var string */ private $_lineEnding = PHP_EOL; /** - * Sheet index to read + * Sheet index to read * - * @access private - * @var int + * @access private + * @var int */ private $_sheetIndex = 0; /** - * Load rows contiguously + * Load rows contiguously * - * @access private - * @var int + * @access private + * @var int */ private $_contiguous = false; /** - * Row counter for loading rows contiguously + * Row counter for loading rows contiguously * - * @access private - * @var int + * @access private + * @var int */ private $_contiguousRow = -1; /** - * PHPExcel_Reader_IReadFilter instance + * PHPExcel_Reader_IReadFilter instance * - * @access private - * @var PHPExcel_Reader_IReadFilter + * @access private + * @var PHPExcel_Reader_IReadFilter */ private $_readFilter = null; /** - * Create a new PHPExcel_Reader_CSV + * Create a new PHPExcel_Reader_CSV */ public function __construct() { $this->_readFilter = new PHPExcel_Reader_DefaultReadFilter(); } // function __construct() /** - * Can the current PHPExcel_Reader_IReader read the file? + * Can the current PHPExcel_Reader_IReader read the file? * - * @access public - * @param string $pFileName - * @return boolean - * @throws Exception + * @access public + * @param string $pFileName + * @return boolean + * @throws Exception */ public function canRead($pFilename) { @@ -135,12 +135,12 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader } // function canRead() /** - * Loads PHPExcel from file + * Loads PHPExcel from file * - * @access public - * @param string $pFilename - * @return PHPExcel - * @throws Exception + * @access public + * @param string $pFilename + * @return PHPExcel + * @throws Exception */ public function load($pFilename) { @@ -152,20 +152,20 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader } // function load() /** - * Read filter + * Read filter * - * @access public - * @return PHPExcel_Reader_IReadFilter + * @access public + * @return PHPExcel_Reader_IReadFilter */ public function getReadFilter() { return $this->_readFilter; } // function getReadFilter() /** - * Set read filter + * Set read filter * - * @access public - * @param PHPExcel_Reader_IReadFilter $pValue + * @access public + * @param PHPExcel_Reader_IReadFilter $pValue */ public function setReadFilter(PHPExcel_Reader_IReadFilter $pValue) { $this->_readFilter = $pValue; @@ -173,10 +173,10 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader } // function setReadFilter() /** - * Set input encoding + * Set input encoding * - * @access public - * @param string $pValue Input encoding + * @access public + * @param string $pValue Input encoding */ public function setInputEncoding($pValue = 'UTF-8') { @@ -185,10 +185,10 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader } // function setInputEncoding() /** - * Get input encoding + * Get input encoding * - * @access public - * @return string + * @access public + * @return string */ public function getInputEncoding() { @@ -196,13 +196,13 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader } // function getInputEncoding() /** - * Loads PHPExcel from file into PHPExcel instance + * Loads PHPExcel from file into PHPExcel instance * - * @access public - * @param string $pFilename - * @param PHPExcel $objPHPExcel - * @return PHPExcel - * @throws Exception + * @access public + * @param string $pFilename + * @param PHPExcel $objPHPExcel + * @return PHPExcel + * @throws Exception */ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel) { @@ -297,21 +297,21 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader } // function loadIntoExisting() /** - * Get delimiter + * Get delimiter * - * @access public - * @return string + * @access public + * @return string */ public function getDelimiter() { return $this->_delimiter; } // function getDelimiter() /** - * Set delimiter + * Set delimiter * - * @access public - * @param string $pValue Delimiter, defaults to , - * @return PHPExcel_Reader_CSV + * @access public + * @param string $pValue Delimiter, defaults to , + * @return PHPExcel_Reader_CSV */ public function setDelimiter($pValue = ',') { $this->_delimiter = $pValue; @@ -319,21 +319,21 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader } // function setDelimiter() /** - * Get enclosure + * Get enclosure * - * @access public - * @return string + * @access public + * @return string */ public function getEnclosure() { return $this->_enclosure; } // function getEnclosure() /** - * Set enclosure + * Set enclosure * - * @access public - * @param string $pValue Enclosure, defaults to " - * @return PHPExcel_Reader_CSV + * @access public + * @param string $pValue Enclosure, defaults to " + * @return PHPExcel_Reader_CSV */ public function setEnclosure($pValue = '"') { if ($pValue == '') { @@ -344,21 +344,21 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader } // function setEnclosure() /** - * Get line ending + * Get line ending * - * @access public - * @return string + * @access public + * @return string */ public function getLineEnding() { return $this->_lineEnding; } // function getLineEnding() /** - * Set line ending + * Set line ending * - * @access public - * @param string $pValue Line ending, defaults to OS line ending (PHP_EOL) - * @return PHPExcel_Reader_CSV + * @access public + * @param string $pValue Line ending, defaults to OS line ending (PHP_EOL) + * @return PHPExcel_Reader_CSV */ public function setLineEnding($pValue = PHP_EOL) { $this->_lineEnding = $pValue; @@ -366,21 +366,21 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader } // function setLineEnding() /** - * Get sheet index + * Get sheet index * - * @access public - * @return int + * @access public + * @return int */ public function getSheetIndex() { return $this->_sheetIndex; } // function getSheetIndex() /** - * Set sheet index + * Set sheet index * - * @access public - * @param int $pValue Sheet index - * @return PHPExcel_Reader_CSV + * @access public + * @param int $pValue Sheet index + * @return PHPExcel_Reader_CSV */ public function setSheetIndex($pValue = 0) { $this->_sheetIndex = $pValue; @@ -388,10 +388,10 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader } // function setSheetIndex() /** - * Set Contiguous + * Set Contiguous * - * @access public - * @param string $pValue Input encoding + * @access public + * @param string $pValue Input encoding */ public function setContiguous($contiguous = false) { @@ -404,10 +404,10 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader } // function setInputEncoding() /** - * Get Contiguous + * Get Contiguous * - * @access public - * @return boolean + * @access public + * @return boolean */ public function getContiguous() { return $this->_contiguous; diff --git a/Classes/PHPExcel/Reader/Excel2003XML.php b/Classes/PHPExcel/Reader/Excel2003XML.php index 8e7f5e5d..642ec4cb 100644 --- a/Classes/PHPExcel/Reader/Excel2003XML.php +++ b/Classes/PHPExcel/Reader/Excel2003XML.php @@ -162,11 +162,11 @@ class PHPExcel_Reader_Excel2003XML implements PHPExcel_Reader_IReader } /** - * Can the current PHPExcel_Reader_IReader read the file? + * Can the current PHPExcel_Reader_IReader read the file? * - * @param string $pFileName - * @return boolean - * @throws Exception + * @param string $pFileName + * @return boolean + * @throws Exception */ public function canRead($pFilename) { diff --git a/Classes/PHPExcel/Reader/Excel2007.php b/Classes/PHPExcel/Reader/Excel2007.php index cabd5f02..8e4068f0 100644 --- a/Classes/PHPExcel/Reader/Excel2007.php +++ b/Classes/PHPExcel/Reader/Excel2007.php @@ -36,36 +36,36 @@ if (!defined('PHPEXCEL_ROOT')) { } /** - * PHPExcel_Reader_Excel2007 + * PHPExcel_Reader_Excel2007 * - * @category PHPExcel - * @package PHPExcel_Reader - * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) + * @category PHPExcel + * @package PHPExcel_Reader + * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) */ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader { /** - * Read data only? - * Identifies whether the Reader should only read data values for cells, and ignore any formatting information; + * Read data only? + * Identifies whether the Reader should only read data values for cells, and ignore any formatting information; * or whether it should read both data and formatting * - * @var boolean + * @var boolean */ private $_readDataOnly = false; /** - * Read charts that are defined in the workbook? - * Identifies whether the Reader should read the definitions for any charts that exist in the workbook; + * Read charts that are defined in the workbook? + * Identifies whether the Reader should read the definitions for any charts that exist in the workbook; * - * @var boolean + * @var boolean */ private $_includeCharts = false; /** - * Restrict which sheets should be loaded? - * This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded. + * Restrict which sheets should be loaded? + * This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded. * - * @var array of string + * @var array of string */ private $_loadSheetsOnly = null; @@ -92,24 +92,24 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader /** - * Read data only? + * Read data only? * If this is true, then the Reader will only read data values for cells, it will not read any formatting information. * If false (the default) it will read data and formatting. * - * @return boolean + * @return boolean */ public function getReadDataOnly() { return $this->_readDataOnly; } /** - * Set read data only + * Set read data only * Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information. * Set to false (the default) to advise the Reader to read both data and formatting for cells. * - * @param boolean $pValue + * @param boolean $pValue * - * @return PHPExcel_Reader_Excel2007 + * @return PHPExcel_Reader_Excel2007 */ public function setReadDataOnly($pValue = false) { $this->_readDataOnly = $pValue; @@ -117,26 +117,26 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader } /** - * Read charts in workbook? + * Read charts in workbook? * If this is true, then the Reader will include any charts that exist in the workbook. * Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. * If false (the default) it will ignore any charts defined in the workbook file. * - * @return boolean + * @return boolean */ public function getIncludeCharts() { return $this->_includeCharts; } /** - * Set read charts in workbook + * Set read charts in workbook * Set to true, to advise the Reader to include any charts that exist in the workbook. * Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. * Set to false (the default) to discard charts. * - * @param boolean $pValue + * @param boolean $pValue * - * @return PHPExcel_Reader_Excel2007 + * @return PHPExcel_Reader_Excel2007 */ public function setIncludeCharts($pValue = false) { $this->_includeCharts = (boolean) $pValue; @@ -144,11 +144,11 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader } /** - * Get which sheets to load - * Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null - * indicating that all worksheets in the workbook should be loaded. + * Get which sheets to load + * Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null + * indicating that all worksheets in the workbook should be loaded. * - * @return mixed + * @return mixed */ public function getLoadSheetsOnly() { @@ -156,13 +156,13 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader } /** - * Set which sheets to load + * Set which sheets to load * - * @param mixed $value + * @param mixed $value * This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name. * If NULL, then it tells the Reader to read all worksheets in the workbook * - * @return PHPExcel_Reader_Excel2007 + * @return PHPExcel_Reader_Excel2007 */ public function setLoadSheetsOnly($value = null) { @@ -172,10 +172,10 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader } /** - * Set all sheets to load + * Set all sheets to load * Tells the Reader to load all worksheets from the workbook. * - * @return PHPExcel_Reader_Excel2007 + * @return PHPExcel_Reader_Excel2007 */ public function setLoadAllSheets() { @@ -212,11 +212,11 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader } /** - * Can the current PHPExcel_Reader_IReader read the file? + * Can the current PHPExcel_Reader_IReader read the file? * - * @param string $pFileName - * @return boolean - * @throws Exception + * @param string $pFileName + * @return boolean + * @throws Exception */ public function canRead($pFilename) { diff --git a/Classes/PHPExcel/Reader/Excel5.php b/Classes/PHPExcel/Reader/Excel5.php index 73f7df33..2190782a 100644 --- a/Classes/PHPExcel/Reader/Excel5.php +++ b/Classes/PHPExcel/Reader/Excel5.php @@ -67,13 +67,13 @@ if (!defined('PHPEXCEL_ROOT')) { } /** - * PHPExcel_Reader_Excel5 + * PHPExcel_Reader_Excel5 * - * This class uses {@link http://sourceforge.net/projects/phpexcelreader/parseXL} + * This class uses {@link http://sourceforge.net/projects/phpexcelreader/parseXL} * - * @category PHPExcel - * @package PHPExcel_Reader_Excel5 - * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) + * @category PHPExcel + * @package PHPExcel_Reader_Excel5 + * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) */ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader { @@ -159,19 +159,19 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader const XLS_Type_UNKNOWN = 0xffff; /** - * Read data only? - * Identifies whether the Reader should only read data values for cells, and ignore any formatting information; + * Read data only? + * Identifies whether the Reader should only read data values for cells, and ignore any formatting information; * or whether it should read both data and formatting * - * @var boolean + * @var boolean */ private $_readDataOnly = false; /** - * Restrict which sheets should be loaded? - * This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded. + * Restrict which sheets should be loaded? + * This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded. * - * @var array of string + * @var array of string */ private $_loadSheetsOnly = null; @@ -403,11 +403,11 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader /** - * Read data only? + * Read data only? * If this is true, then the Reader will only read data values for cells, it will not read any formatting information. * If false (the default) it will read data and formatting. * - * @return boolean + * @return boolean */ public function getReadDataOnly() { @@ -415,13 +415,13 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader } /** - * Set read data only + * Set read data only * Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information. * Set to false (the default) to advise the Reader to read both data and formatting for cells. * - * @param boolean $pValue + * @param boolean $pValue * - * @return PHPExcel_Reader_Excel5 + * @return PHPExcel_Reader_Excel5 */ public function setReadDataOnly($pValue = false) { @@ -430,11 +430,11 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader } /** - * Get which sheets to load + * Get which sheets to load * Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null * indicating that all worksheets in the workbook should be loaded. * - * @return mixed + * @return mixed */ public function getLoadSheetsOnly() { @@ -442,13 +442,13 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader } /** - * Set which sheets to load + * Set which sheets to load * - * @param mixed $value + * @param mixed $value * This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name. * If NULL, then it tells the Reader to read all worksheets in the workbook * - * @return PHPExcel_Reader_Excel5 + * @return PHPExcel_Reader_Excel5 */ public function setLoadSheetsOnly($value = null) { @@ -458,10 +458,10 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader } /** - * Set all sheets to load + * Set all sheets to load * Tells the Reader to load all worksheets from the workbook. * - * @return PHPExcel_Reader_Excel5 + * @return PHPExcel_Reader_Excel5 */ public function setLoadAllSheets() { @@ -497,11 +497,11 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader } /** - * Can the current PHPExcel_Reader_IReader read the file? + * Can the current PHPExcel_Reader_IReader read the file? * - * @param string $pFileName - * @return boolean - * @throws Exception + * @param string $pFileName + * @return boolean + * @throws Exception */ public function canRead($pFilename) { diff --git a/Classes/PHPExcel/Reader/Gnumeric.php b/Classes/PHPExcel/Reader/Gnumeric.php index ddc48e66..9dc54f49 100644 --- a/Classes/PHPExcel/Reader/Gnumeric.php +++ b/Classes/PHPExcel/Reader/Gnumeric.php @@ -36,28 +36,28 @@ if (!defined('PHPEXCEL_ROOT')) { } /** - * PHPExcel_Reader_Gnumeric + * PHPExcel_Reader_Gnumeric * - * @category PHPExcel - * @package PHPExcel_Reader - * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) + * @category PHPExcel + * @package PHPExcel_Reader + * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) */ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader { /** - * Read data only? - * Identifies whether the Reader should only read data values for cells, and ignore any formatting information; + * Read data only? + * Identifies whether the Reader should only read data values for cells, and ignore any formatting information; * or whether it should read both data and formatting * - * @var boolean + * @var boolean */ private $_readDataOnly = false; /** - * Restrict which sheets should be loaded? - * This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded. + * Restrict which sheets should be loaded? + * This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded. * - * @var array of string + * @var array of string */ private $_loadSheetsOnly = null; @@ -86,24 +86,24 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader /** - * Read data only? + * Read data only? * If this is true, then the Reader will only read data values for cells, it will not read any formatting information. * If false (the default) it will read data and formatting. * - * @return boolean + * @return boolean */ public function getReadDataOnly() { return $this->_readDataOnly; } /** - * Set read data only + * Set read data only * Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information. * Set to false (the default) to advise the Reader to read both data and formatting for cells. * - * @param boolean $pValue + * @param boolean $pValue * - * @return PHPExcel_Reader_Gnumeric + * @return PHPExcel_Reader_Gnumeric */ public function setReadDataOnly($pValue = false) { $this->_readDataOnly = $pValue; @@ -111,11 +111,11 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader } /** - * Get which sheets to load - * Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null - * indicating that all worksheets in the workbook should be loaded. + * Get which sheets to load + * Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null + * indicating that all worksheets in the workbook should be loaded. * - * @return mixed + * @return mixed */ public function getLoadSheetsOnly() { @@ -123,13 +123,13 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader } /** - * Set which sheets to load + * Set which sheets to load * - * @param mixed $value + * @param mixed $value * This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name. * If NULL, then it tells the Reader to read all worksheets in the workbook * - * @return PHPExcel_Reader_Gnumeric + * @return PHPExcel_Reader_Gnumeric */ public function setLoadSheetsOnly($value = null) { @@ -139,10 +139,10 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader } /** - * Set all sheets to load + * Set all sheets to load * Tells the Reader to load all worksheets from the workbook. * - * @return PHPExcel_Reader_Gnumeric + * @return PHPExcel_Reader_Gnumeric */ public function setLoadAllSheets() { @@ -179,11 +179,11 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader } /** - * Can the current PHPExcel_Reader_IReader read the file? + * Can the current PHPExcel_Reader_IReader read the file? * - * @param string $pFileName - * @return boolean - * @throws Exception + * @param string $pFileName + * @return boolean + * @throws Exception */ public function canRead($pFilename) { diff --git a/Classes/PHPExcel/Reader/OOCalc.php b/Classes/PHPExcel/Reader/OOCalc.php index 8ad8fa2a..d2f73df8 100644 --- a/Classes/PHPExcel/Reader/OOCalc.php +++ b/Classes/PHPExcel/Reader/OOCalc.php @@ -36,28 +36,28 @@ if (!defined('PHPEXCEL_ROOT')) { } /** - * PHPExcel_Reader_OOCalc + * PHPExcel_Reader_OOCalc * - * @category PHPExcel - * @package PHPExcel_Reader - * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) + * @category PHPExcel + * @package PHPExcel_Reader + * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) */ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader { /** - * Read data only? - * Identifies whether the Reader should only read data values for cells, and ignore any formatting information; + * Read data only? + * Identifies whether the Reader should only read data values for cells, and ignore any formatting information; * or whether it should read both data and formatting * - * @var boolean + * @var boolean */ private $_readDataOnly = false; /** - * Restrict which sheets should be loaded? - * This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded. + * Restrict which sheets should be loaded? + * This property holds an array of worksheet names to be loaded. If null, then all worksheets will be loaded. * - * @var array of string + * @var array of string */ private $_loadSheetsOnly = null; @@ -77,24 +77,23 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader /** - * Read data only? + * Read data only? * If this is true, then the Reader will only read data values for cells, it will not read any formatting information. * If false (the default) it will read data and formatting. * - * @return boolean + * @return boolean */ public function getReadDataOnly() { return $this->_readDataOnly; } /** - * Set read data only + * Set read data only * Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information. * Set to false (the default) to advise the Reader to read both data and formatting for cells. * - * @param boolean $pValue - * - * @return PHPExcel_Reader_OOCalc + * @param boolean $pValue + * @return PHPExcel_Reader_OOCalc */ public function setReadDataOnly($pValue = false) { $this->_readDataOnly = $pValue; @@ -102,11 +101,11 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader } /** - * Get which sheets to load + * Get which sheets to load * Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null * indicating that all worksheets in the workbook should be loaded. * - * @return mixed + * @return mixed */ public function getLoadSheetsOnly() { @@ -114,13 +113,13 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader } /** - * Set which sheets to load + * Set which sheets to load * - * @param mixed $value + * @param mixed $value * This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name. * If NULL, then it tells the Reader to read all worksheets in the workbook * - * @return PHPExcel_Reader_OOCalc + * @return PHPExcel_Reader_OOCalc */ public function setLoadSheetsOnly($value = null) { @@ -130,10 +129,10 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader } /** - * Set all sheets to load + * Set all sheets to load * Tells the Reader to load all worksheets from the workbook. * - * @return PHPExcel_Reader_OOCalc + * @return PHPExcel_Reader_OOCalc */ public function setLoadAllSheets() { @@ -169,11 +168,11 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader } /** - * Can the current PHPExcel_Reader_IReader read the file? + * Can the current PHPExcel_Reader_IReader read the file? * - * @param string $pFileName - * @return boolean - * @throws Exception + * @param string $pFileName + * @return boolean + * @throws Exception */ public function canRead($pFilename) { diff --git a/Classes/PHPExcel/Reader/SYLK.php b/Classes/PHPExcel/Reader/SYLK.php index d9e69b15..15a98d1b 100644 --- a/Classes/PHPExcel/Reader/SYLK.php +++ b/Classes/PHPExcel/Reader/SYLK.php @@ -87,11 +87,11 @@ class PHPExcel_Reader_SYLK implements PHPExcel_Reader_IReader } /** - * Can the current PHPExcel_Reader_IReader read the file? + * Can the current PHPExcel_Reader_IReader read the file? * - * @param string $pFileName - * @return boolean - * @throws Exception + * @param string $pFileName + * @return boolean + * @throws Exception */ public function canRead($pFilename) { diff --git a/Classes/PHPExcel/Settings.php b/Classes/PHPExcel/Settings.php index 63e9222f..a6df5cf3 100644 --- a/Classes/PHPExcel/Settings.php +++ b/Classes/PHPExcel/Settings.php @@ -63,55 +63,55 @@ class PHPExcel_Settings /** - * Name of the class used for Zip file management + * Name of the class used for Zip file management * e.g. * ZipArchive * - * @var string + * @var string */ private static $_zipClass = self::ZIPARCHIVE; /** - * Name of the external Library used for rendering charts + * Name of the external Library used for rendering charts * e.g. * jpgraph * - * @var string + * @var string */ private static $_chartRendererName = NULL; /** - * Directory Path to the external Library used for rendering charts + * Directory Path to the external Library used for rendering charts * - * @var string + * @var string */ private static $_chartRendererPath = NULL; /** - * Name of the external Library used for rendering PDF files + * Name of the external Library used for rendering PDF files * e.g. * mPDF * - * @var string + * @var string */ private static $_pdfRendererName = NULL; /** - * Directory Path to the external Library used for rendering PDF files + * Directory Path to the external Library used for rendering PDF files * - * @var string + * @var string */ private static $_pdfRendererPath = NULL; /** - * Set the Zip handler Class that PHPExcel should use for Zip file management (PCLZip or ZipArchive) + * Set the Zip handler Class that PHPExcel should use for Zip file management (PCLZip or ZipArchive) * - * @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management + * @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive - * @return boolean Success or failure + * @return boolean Success or failure */ public static function setZipClass($zipClass) { if (($zipClass === self::PCLZIP) || @@ -124,10 +124,10 @@ class PHPExcel_Settings /** - * Return the name of the Zip handler Class that PHPExcel is configured to use (PCLZip or ZipArchive) + * Return the name of the Zip handler Class that PHPExcel is configured to use (PCLZip or ZipArchive) * for Zip file management * - * @return string Name of the Zip handler Class that PHPExcel is configured to use + * @return string Name of the Zip handler Class that PHPExcel is configured to use * for Zip file management * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive */ @@ -137,9 +137,9 @@ class PHPExcel_Settings /** - * Return the name of the method that is currently configured for cell cacheing + * Return the name of the method that is currently configured for cell cacheing * - * @return string Name of the cacheing method + * @return string Name of the cacheing method */ public static function getCacheStorageMethod() { return PHPExcel_CachedObjectStorageFactory::$_cacheStorageMethod; @@ -147,9 +147,9 @@ class PHPExcel_Settings /** - * Return the name of the class that is currently being used for cell cacheing + * Return the name of the class that is currently being used for cell cacheing * - * @return string Name of the class currently being used for cacheing + * @return string Name of the class currently being used for cacheing */ public static function getCacheStorageClass() { return PHPExcel_CachedObjectStorageFactory::$_cacheStorageClass; @@ -157,11 +157,11 @@ class PHPExcel_Settings /** - * Set the method that should be used for cell cacheing + * Set the method that should be used for cell cacheing * - * @param string $method Name of the cacheing method - * @param array $arguments Optional configuration arguments for the cacheing method - * @return boolean Success or failure + * @param string $method Name of the cacheing method + * @param array $arguments Optional configuration arguments for the cacheing method + * @return boolean Success or failure */ public static function setCacheStorageMethod($method = PHPExcel_CachedObjectStorageFactory::cache_in_memory, $arguments = array()) { @@ -170,10 +170,10 @@ class PHPExcel_Settings /** - * Set the locale code to use for formula translations and any special formatting + * Set the locale code to use for formula translations and any special formatting * - * @param string $locale The locale code to use (e.g. "fr" or "pt_br" or "en_uk") - * @return boolean Success or failure + * @param string $locale The locale code to use (e.g. "fr" or "pt_br" or "en_uk") + * @return boolean Success or failure */ public static function setLocale($locale='en_us') { return PHPExcel_Calculation::getInstance()->setLocale($locale); diff --git a/Classes/PHPExcel/Shared/OLE/PPS/Root.php b/Classes/PHPExcel/Shared/OLE/PPS/Root.php index 2c1a4a40..9a214167 100644 --- a/Classes/PHPExcel/Shared/OLE/PPS/Root.php +++ b/Classes/PHPExcel/Shared/OLE/PPS/Root.php @@ -31,8 +31,8 @@ class PHPExcel_Shared_OLE_PPS_Root extends PHPExcel_Shared_OLE_PPS { /** - * Directory for temporary files - * @var string + * Directory for temporary files + * @var string */ protected $_tmp_dir = NULL; diff --git a/Classes/PHPExcel/Shared/String.php b/Classes/PHPExcel/Shared/String.php index 164be2a0..a8753418 100644 --- a/Classes/PHPExcel/Shared/String.php +++ b/Classes/PHPExcel/Shared/String.php @@ -683,10 +683,10 @@ class PHPExcel_Shared_String } /** - * Set the currency code. Only used by PHPExcel_Style_NumberFormat::toFormattedString() + * Set the currency code. Only used by PHPExcel_Style_NumberFormat::toFormattedString() * to format output by PHPExcel_Writer_HTML and PHPExcel_Writer_PDF * - * @param string $pValue Character for currency code + * @param string $pValue Character for currency code */ public static function setCurrencyCode($pValue = '$') { diff --git a/Classes/PHPExcel/Worksheet.php b/Classes/PHPExcel/Worksheet.php index 1474d592..37a05d72 100644 --- a/Classes/PHPExcel/Worksheet.php +++ b/Classes/PHPExcel/Worksheet.php @@ -535,11 +535,24 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable return $pChart; } + /** + * Return the count of charts on this worksheet + * + * @return int The number of charts + * @throws Exception + */ public function getChartCount() { return count($this->_chartCollection); } + /** + * Get a chart by its index position + * + * @param string $index Chart index position + * @return false|PHPExcel_Chart + * @throws Exception + */ public function getChartByIndex($index = null) { $chartCount = count($this->_chartCollection); @@ -556,6 +569,12 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable return $this->_chartCollection[$index]; } + /** + * Return an array of the names of charts on this worksheet + * + * @return string[] The names of charts + * @throws Exception + */ public function getChartNames() { $chartNames = array(); @@ -565,6 +584,13 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable return $chartNames; } + /** + * Get a chart by name + * + * @param string $chartName Chart name + * @return false|PHPExcel_Chart + * @throws Exception + */ public function getChartByName($chartName = '') { $chartCount = count($this->_chartCollection); @@ -1250,7 +1276,6 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * Get column dimension at a specific column by using numeric cell coordinates * * @param string $pColumn Numeric column coordinate of the cell - * @param string $pRow Numeric row coordinate of the cell * @return PHPExcel_Worksheet_ColumnDimension */ public function getColumnDimensionByColumn($pColumn = 0) @@ -1284,7 +1309,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * Set default style - should only be used by PHPExcel_IReader implementations! * * @deprecated - * @param PHPExcel_Style $value + * @param PHPExcel_Style $pValue * @throws Exception * @return PHPExcel_Worksheet */ @@ -2221,7 +2246,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable /** * Selected cell * - * @param string $pCell Cell (i.e. A1) + * @param string $pCoordinate Cell (i.e. A1) * @return PHPExcel_Worksheet */ public function setSelectedCell($pCoordinate = 'A1') @@ -2588,7 +2613,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable /** * Hyperlink at a specific coordinate exists? * - * @param string $pCellCoordinate + * @param string $pCoordinate * @return boolean */ public function hyperlinkExists($pCoordinate = 'A1') @@ -2643,7 +2668,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable /** * Data validation at a specific coordinate exists? * - * @param string $pCellCoordinate + * @param string $pCoordinate * @return boolean */ public function dataValidationExists($pCoordinate = 'A1') diff --git a/Classes/PHPExcel/Worksheet/CellIterator.php b/Classes/PHPExcel/Worksheet/CellIterator.php index 44eed6b7..2378340d 100644 --- a/Classes/PHPExcel/Worksheet/CellIterator.php +++ b/Classes/PHPExcel/Worksheet/CellIterator.php @@ -117,7 +117,7 @@ class PHPExcel_Worksheet_CellIterator implements Iterator } /** - * More PHPExcel_Cell instances available? + * Are there any more PHPExcel_Cell instances available? * * @return boolean */ @@ -151,9 +151,9 @@ class PHPExcel_Worksheet_CellIterator implements Iterator } /** - * Set loop only existing cells + * Set the iterator to loop only existing cells * - * @return boolean + * @param boolean $value */ public function setIterateOnlyExistingCells($value = true) { $this->_onlyExistingCells = $value; diff --git a/Classes/PHPExcel/Worksheet/PageSetup.php b/Classes/PHPExcel/Worksheet/PageSetup.php index 625d108f..458b73f5 100644 --- a/Classes/PHPExcel/Worksheet/PageSetup.php +++ b/Classes/PHPExcel/Worksheet/PageSetup.php @@ -214,7 +214,7 @@ class PHPExcel_Worksheet_PageSetup * * @var boolean */ - private $_fitToPage = false; + private $_fitToPage = FALSE; /** * Fit To Height @@ -251,28 +251,28 @@ class PHPExcel_Worksheet_PageSetup * * @var boolean */ - private $_horizontalCentered = false; + private $_horizontalCentered = FALSE; /** * Center page vertically * * @var boolean */ - private $_verticalCentered = false; + private $_verticalCentered = FALSE; /** * Print area * * @var string */ - private $_printArea = null; + private $_printArea = NULL; /** * First page number * * @var int */ - private $_firstPageNumber = null; + private $_firstPageNumber = NULL; /** * Create a new PHPExcel_Worksheet_PageSetup @@ -336,10 +336,10 @@ class PHPExcel_Worksheet_PageSetup * Print scaling. Valid values range from 10 to 400 * This setting is overridden when fitToWidth and/or fitToHeight are in use * - * @param int? $pValue - * @param boolean $pUpdate Update fitToPage so scaling applies rather than fitToHeight / fitToWidth - * @throws Exception + * @param int? $pValue + * @param boolean $pUpdate Update fitToPage so scaling applies rather than fitToHeight / fitToWidth * @return PHPExcel_Worksheet_PageSetup + * @throws Exception */ public function setScale($pValue = 100, $pUpdate = true) { // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface, @@ -370,7 +370,7 @@ class PHPExcel_Worksheet_PageSetup * @param boolean $pValue * @return PHPExcel_Worksheet_PageSetup */ - public function setFitToPage($pValue = true) { + public function setFitToPage($pValue = TRUE) { $this->_fitToPage = $pValue; return $this; } @@ -391,10 +391,10 @@ class PHPExcel_Worksheet_PageSetup * @param boolean $pUpdate Update fitToPage so it applies rather than scaling * @return PHPExcel_Worksheet_PageSetup */ - public function setFitToHeight($pValue = 1, $pUpdate = true) { + public function setFitToHeight($pValue = 1, $pUpdate = TRUE) { $this->_fitToHeight = $pValue; if ($pUpdate) { - $this->_fitToPage = true; + $this->_fitToPage = TRUE; } return $this; } @@ -415,10 +415,10 @@ class PHPExcel_Worksheet_PageSetup * @param boolean $pUpdate Update fitToPage so it applies rather than scaling * @return PHPExcel_Worksheet_PageSetup */ - public function setFitToWidth($pValue = 1, $pUpdate = true) { + public function setFitToWidth($pValue = 1, $pUpdate = TRUE) { $this->_fitToWidth = $pValue; if ($pUpdate) { - $this->_fitToPage = true; + $this->_fitToPage = TRUE; } return $this; } @@ -499,7 +499,7 @@ class PHPExcel_Worksheet_PageSetup /** * Set Rows to repeat at top * - * @param array $pValue Containing start column and end column, empty array if option unset + * @param array $pValue Containing start column and end column, empty array if option unset * @return PHPExcel_Worksheet_PageSetup */ public function setRowsToRepeatAtTop($pValue = null) { @@ -564,12 +564,12 @@ class PHPExcel_Worksheet_PageSetup /** * Get print area * - * @param int $index Identifier for a specific print area range if several ranges have been set + * @param int $index Identifier for a specific print area range if several ranges have been set * Default behaviour, or a index value of 0, will return all ranges as a comma-separated string * Otherwise, the specific range identified by the value of $index will be returned * Print areas are numbered from 1 - * @throws Exception - * @return string + * @throws Exception + * @return string */ public function getPrintArea($index = 0) { if ($index == 0) { @@ -583,13 +583,13 @@ class PHPExcel_Worksheet_PageSetup } /** - * Is print area set? + * Is print area set? * - * @param int $index Identifier for a specific print area range if several ranges have been set + * @param int $index Identifier for a specific print area range if several ranges have been set * Default behaviour, or an index value of 0, will identify whether any print range is set * Otherwise, existence of the range identified by the value of $index will be returned * Print areas are numbered from 1 - * @return boolean + * @return boolean */ public function isPrintAreaSet($index = 0) { if ($index == 0) { @@ -600,13 +600,13 @@ class PHPExcel_Worksheet_PageSetup } /** - * Clear a print area + * Clear a print area * - * @param int $index Identifier for a specific print area range if several ranges have been set + * @param int $index Identifier for a specific print area range if several ranges have been set * Default behaviour, or an index value of 0, will clear all print ranges that are set * Otherwise, the range identified by the value of $index will be removed from the series * Print areas are numbered from 1 - * @return PHPExcel_Worksheet_PageSetup + * @return PHPExcel_Worksheet_PageSetup */ public function clearPrintArea($index = 0) { if ($index == 0) { @@ -623,10 +623,10 @@ class PHPExcel_Worksheet_PageSetup } /** - * Set print area. e.g. 'A1:D10' or 'A1:D10,G5:M20' + * Set print area. e.g. 'A1:D10' or 'A1:D10,G5:M20' * - * @param string $value - * @param int $index Identifier for a specific print area range allowing several ranges to be set + * @param string $value + * @param int $index Identifier for a specific print area range allowing several ranges to be set * When the method is "O"verwrite, then a positive integer index will overwrite that indexed * entry in the print areas list; a negative index value will identify which entry to * overwrite working bacward through the print area to the list, with the last entry as -1. @@ -636,11 +636,11 @@ class PHPExcel_Worksheet_PageSetup * Specifying an index value of 0, will always append the new print range at the end of the * list. * Print areas are numbered from 1 - * @param string $method Determines the method used when setting multiple print areas + * @param string $method Determines the method used when setting multiple print areas * Default behaviour, or the "O" method, overwrites existing print area * The "I" method, inserts the new print area before any specified index, or at the end of the list - * @throws Exception - * @return PHPExcel_Worksheet_PageSetup + * @return PHPExcel_Worksheet_PageSetup + * @throws Exception */ public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) { if (strpos($value,'!') !== false) { @@ -688,44 +688,44 @@ class PHPExcel_Worksheet_PageSetup } /** - * Add a new print area (e.g. 'A1:D10' or 'A1:D10,G5:M20') to the list of print areas + * Add a new print area (e.g. 'A1:D10' or 'A1:D10,G5:M20') to the list of print areas * - * @param string $value - * @param int $index Identifier for a specific print area range allowing several ranges to be set + * @param string $value + * @param int $index Identifier for a specific print area range allowing several ranges to be set * A positive index will insert after that indexed entry in the print areas list, while a * negative index will insert before the indexed entry. * Specifying an index value of 0, will always append the new print range at the end of the * list. * Print areas are numbered from 1 - * @throws Exception - * @return PHPExcel_Worksheet_PageSetup + * @return PHPExcel_Worksheet_PageSetup + * @throws Exception */ public function addPrintArea($value, $index = -1) { return $this->setPrintArea($value, $index, self::SETPRINTRANGE_INSERT); } /** - * Set print area + * Set print area * - * @param int $column1 Column 1 - * @param int $row1 Row 1 - * @param int $column2 Column 2 - * @param int $row2 Row 2 - * @param int $index Identifier for a specific print area range allowing several ranges to be set - * When the method is "O"verwrite, then a positive integer index will overwrite that indexed - * entry in the print areas list; a negative index value will identify which entry to - * overwrite working bacward through the print area to the list, with the last entry as -1. - * Specifying an index value of 0, will overwrite all existing print ranges. - * When the method is "I"nsert, then a positive index will insert after that indexed entry in - * the print areas list, while a negative index will insert before the indexed entry. - * Specifying an index value of 0, will always append the new print range at the end of the - * list. - * Print areas are numbered from 1 - * @param string $method Determines the method used when setting multiple print areas - * Default behaviour, or the "O" method, overwrites existing print area - * The "I" method, inserts the new print area before any specified index, or at the end of the list - * @throws Exception - * @return PHPExcel_Worksheet_PageSetup + * @param int $column1 Column 1 + * @param int $row1 Row 1 + * @param int $column2 Column 2 + * @param int $row2 Row 2 + * @param int $index Identifier for a specific print area range allowing several ranges to be set + * When the method is "O"verwrite, then a positive integer index will overwrite that indexed + * entry in the print areas list; a negative index value will identify which entry to + * overwrite working bacward through the print area to the list, with the last entry as -1. + * Specifying an index value of 0, will overwrite all existing print ranges. + * When the method is "I"nsert, then a positive index will insert after that indexed entry in + * the print areas list, while a negative index will insert before the indexed entry. + * Specifying an index value of 0, will always append the new print range at the end of the + * list. + * Print areas are numbered from 1 + * @param string $method Determines the method used when setting multiple print areas + * Default behaviour, or the "O" method, overwrites existing print area + * The "I" method, inserts the new print area before any specified index, or at the end of the list + * @return PHPExcel_Worksheet_PageSetup + * @throws Exception */ public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) { @@ -733,20 +733,20 @@ class PHPExcel_Worksheet_PageSetup } /** - * Add a new print area to the list of print areas + * Add a new print area to the list of print areas * - * @param int $column1 Column 1 - * @param int $row1 Row 1 - * @param int $column2 Column 2 - * @param int $row2 Row 2 - * @param int $index Identifier for a specific print area range allowing several ranges to be set + * @param int $column1 Start Column for the print area + * @param int $row1 Start Row for the print area + * @param int $column2 End Column for the print area + * @param int $row2 End Row for the print area + * @param int $index Identifier for a specific print area range allowing several ranges to be set * A positive index will insert after that indexed entry in the print areas list, while a * negative index will insert before the indexed entry. * Specifying an index value of 0, will always append the new print range at the end of the * list. * Print areas are numbered from 1 - * @throws Exception - * @return PHPExcel_Worksheet_PageSetup + * @return PHPExcel_Worksheet_PageSetup + * @throws Exception */ public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1) { diff --git a/Classes/PHPExcel/Writer/Excel2007.php b/Classes/PHPExcel/Writer/Excel2007.php index d2e0eb7d..acf6072f 100644 --- a/Classes/PHPExcel/Writer/Excel2007.php +++ b/Classes/PHPExcel/Writer/Excel2007.php @@ -36,10 +36,10 @@ class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter { /** - * Write charts that are defined in the workbook? - * Identifies whether the Writer should write definitions for any charts that exist in the PHPExcel object; + * Write charts that are defined in the workbook? + * Identifies whether the Writer should write definitions for any charts that exist in the PHPExcel object; * - * @var boolean + * @var boolean */ private $_includeCharts = false; @@ -480,24 +480,24 @@ class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter } /** - * Write charts in workbook? + * Write charts in workbook? * If this is true, then the Writer will write definitions for any charts that exist in the PHPExcel object. * If false (the default) it will ignore any charts defined in the PHPExcel object. * - * @return boolean + * @return boolean */ public function getIncludeCharts() { return $this->_includeCharts; } /** - * Set write charts in workbook + * Set write charts in workbook * Set to true, to advise the Writer to include any charts that exist in the PHPExcel object. * Set to false (the default) to ignore charts. * - * @param boolean $pValue + * @param boolean $pValue * - * @return PHPExcel_Writer_Excel2007 + * @return PHPExcel_Writer_Excel2007 */ public function setIncludeCharts($pValue = false) { $this->_includeCharts = (boolean) $pValue; diff --git a/Classes/PHPExcel/Writer/Excel2007/Chart.php b/Classes/PHPExcel/Writer/Excel2007/Chart.php index bc9343d2..35ca564d 100644 --- a/Classes/PHPExcel/Writer/Excel2007/Chart.php +++ b/Classes/PHPExcel/Writer/Excel2007/Chart.php @@ -108,6 +108,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa return $objWriter->getData(); } + /** + * Write Chart Title + * + * @param PHPExcel_Chart_Title $title + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @throws Exception + */ private function _writeTitle(PHPExcel_Chart_Title $title = null, $objWriter) { if (is_null($title)) { @@ -145,6 +152,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa $objWriter->endElement(); } + /** + * Write Chart Legend + * + * @param PHPExcel_Chart_Legend $legend + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @throws Exception + */ private function _writeLegend(PHPExcel_Chart_Legend $legend = null, $objWriter) { if (is_null($legend)) { @@ -189,6 +203,15 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa $objWriter->endElement(); } + /** + * Write Chart Plot Area + * + * @param PHPExcel_Chart_PlotArea $plotArea + * @param PHPExcel_Chart_Title $xAxisLabel + * @param PHPExcel_Chart_Title $yAxisLabel + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @throws Exception + */ private function _writePlotArea(PHPExcel_Chart_PlotArea $plotArea, PHPExcel_Chart_Title $xAxisLabel = NULL, PHPExcel_Chart_Title $yAxisLabel = NULL, @@ -318,6 +341,12 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa $objWriter->endElement(); } + /** + * Write Data Labels + * + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @throws Exception + */ private function _writeDataLbls($objWriter) { $objWriter->startElement('c:dLbls'); @@ -353,6 +382,18 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa $objWriter->endElement(); } + /** + * Write Category Axis + * + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @param PHPExcel_Chart_PlotArea $plotArea + * @param PHPExcel_Chart_Title $xAxisLabel + * @param string $groupType Chart type + * @param string $id1 + * @param string $id2 + * @param boolean $isMultiLevelSeries + * @throws Exception + */ private function _writeCatAx($objWriter, PHPExcel_Chart_PlotArea $plotArea, $xAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries) { $objWriter->startElement('c:catAx'); @@ -464,6 +505,18 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa } + /** + * Write Value Axis + * + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @param PHPExcel_Chart_PlotArea $plotArea + * @param PHPExcel_Chart_Title $yAxisLabel + * @param string $groupType Chart type + * @param string $id1 + * @param string $id2 + * @param boolean $isMultiLevelSeries + * @throws Exception + */ private function _writeValAx($objWriter, PHPExcel_Chart_PlotArea $plotArea, $yAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries) { $objWriter->startElement('c:valAx'); @@ -573,6 +626,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa } + /** + * Get the data series type(s) for a chart plot series + * + * @param PHPExcel_Chart_PlotArea $plotArea + * @return string|array + * @throws Exception + */ private static function _getChartType($plotArea) { $groupCount = $plotArea->getPlotGroupCount(); @@ -593,6 +653,17 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa return $chartType; } + /** + * Write Plot Group (series of related plots) + * + * @param PHPExcel_Chart_DataSeries $plotGroup + * @param string $groupType Type of plot for dataseries + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @param boolean &$catIsMultiLevelSeries Is category a multi-series category + * @param boolean &$valIsMultiLevelSeries Is value set a multi-series set + * @param string &$plotGroupingType Type of grouping for multi-series values + * @throws Exception + */ private function _writePlotGroup($plotGroup, $groupType, $objWriter, &$catIsMultiLevelSeries, &$valIsMultiLevelSeries, &$plotGroupingType) { if (is_null($plotGroup)) { @@ -770,6 +841,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa } } + /** + * Write Plot Series Label + * + * @param PHPExcel_Chart_DataSeriesValues $plotSeriesLabel + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @throws Exception + */ private function _writePlotSeriesLabel($plotSeriesLabel, $objWriter) { if (is_null($plotSeriesLabel)) { @@ -798,6 +876,15 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa } + /** + * Write Plot Series Values + * + * @param PHPExcel_Chart_DataSeriesValues $plotSeriesValues + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @param string $groupType Type of plot for dataseries + * @param string $dataType Datatype of series values + * @throws Exception + */ private function _writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, $dataType='str') { if (is_null($plotSeriesValues)) { @@ -878,6 +965,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa } } + /** + * Write Bubble Chart Details + * + * @param PHPExcel_Chart_DataSeriesValues $plotSeriesValues + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @throws Exception + */ private function _writeBubbles($plotSeriesValues, $objWriter) { if (is_null($plotSeriesValues)) { @@ -912,6 +1006,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa $objWriter->endElement(); } + /** + * Write Layout + * + * @param PHPExcel_Chart_Layout $layout + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @throws Exception + */ private function _writeLayout(PHPExcel_Chart_Layout $layout = NULL, $objWriter) { $objWriter->startElement('c:layout'); @@ -974,6 +1075,12 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa $objWriter->endElement(); } + /** + * Write Alternate Content block + * + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @throws Exception + */ private function _writeAlternateContent($objWriter) { $objWriter->startElement('mc:AlternateContent'); @@ -997,6 +1104,12 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa $objWriter->endElement(); } + /** + * Write Printer Settings + * + * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer + * @throws Exception + */ private function _writePrintSettings($objWriter) { $objWriter->startElement('c:printSettings'); diff --git a/Classes/PHPExcel/Writer/Excel2007/ContentTypes.php b/Classes/PHPExcel/Writer/Excel2007/ContentTypes.php index 63812762..d701a76c 100644 --- a/Classes/PHPExcel/Writer/Excel2007/ContentTypes.php +++ b/Classes/PHPExcel/Writer/Excel2007/ContentTypes.php @@ -38,7 +38,8 @@ class PHPExcel_Writer_Excel2007_ContentTypes extends PHPExcel_Writer_Excel2007_W /** * Write content types to XML format * - * @param PHPExcel $pPHPExcel + * @param PHPExcel $pPHPExcel + * @param boolean $includeCharts Flag indicating if we should include drawing details for charts * @return string XML Output * @throws Exception */ diff --git a/Classes/PHPExcel/Writer/Excel2007/Drawing.php b/Classes/PHPExcel/Writer/Excel2007/Drawing.php index bf8b8858..71d6561e 100644 --- a/Classes/PHPExcel/Writer/Excel2007/Drawing.php +++ b/Classes/PHPExcel/Writer/Excel2007/Drawing.php @@ -38,8 +38,10 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer /** * Write drawings to XML format * - * @param PHPExcel_Worksheet $pWorksheet - * @return string XML Output + * @param PHPExcel_Worksheet $pWorksheet + * @param int &$chartRef Chart ID + * @param boolean $includeCharts Flag indicating if we should include drawing details for charts + * @return string XML Output * @throws Exception */ public function writeDrawings(PHPExcel_Worksheet $pWorksheet = null, &$chartRef, $includeCharts = FALSE)