Doc Block changes

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@87638 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2012-03-11 17:58:38 +00:00
parent 953b1e82fb
commit 891981928d
44 changed files with 1931 additions and 1790 deletions

View File

@ -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 string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function addCacheData($pCoord, PHPExcel_Cell $cell) { public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { 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 * @param string $pCoord Coordinate address of the cell to check
* @return void * @return void
* @return boolean * @return boolean
*/ */
public function isDataSet($pCoord) { public function isDataSet($pCoord) {
// Check if the requested entry is the current object, or exists in the cache // 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 * @param string $pCoord Coordinate address of the cell to delete
* @throws Exception * @throws Exception
*/ */
public function deleteCacheData($pCoord) { public function deleteCacheData($pCoord) {
// Delete the entry from APC // 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) { public function copyCellCollection(PHPExcel_Worksheet $parent) {
parent::copyCellCollection($parent); parent::copyCellCollection($parent);
@ -221,10 +221,10 @@ class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_Cach
/** /**
* Identify whether the caching method is currently available * Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build * Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* *
* @return boolean * @return boolean
*/ */
public static function cacheMethodIsAvailable() { public static function cacheMethodIsAvailable() {
if (!function_exists('apc_store')) { if (!function_exists('apc_store')) {

View File

@ -36,39 +36,39 @@
class PHPExcel_CachedObjectStorage_CacheBase { class PHPExcel_CachedObjectStorage_CacheBase {
/** /**
* Parent worksheet * Parent worksheet
* *
* @var PHPExcel_Worksheet * @var PHPExcel_Worksheet
*/ */
protected $_parent; protected $_parent;
/** /**
* The currently active Cell * The currently active Cell
* *
* @var PHPExcel_Cell * @var PHPExcel_Cell
*/ */
protected $_currentObject = null; protected $_currentObject = null;
/** /**
* Coordinate address of the currently active Cell * Coordinate address of the currently active Cell
* *
* @var string * @var string
*/ */
protected $_currentObjectID = null; 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; 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 * and indexed by their coordinate address within the worksheet
* *
* @var array of mixed * @var array of mixed
*/ */
protected $_cellCache = array(); 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 * @param string $pCoord Coordinate address of the cell to check
* @return boolean * @return boolean
*/ */
public function isDataSet($pCoord) { public function isDataSet($pCoord) {
if ($pCoord === $this->_currentObjectID) { 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 * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function updateCacheData(PHPExcel_Cell $cell) { public function updateCacheData(PHPExcel_Cell $cell) {
return $this->addCacheData($cell->getCoordinate(),$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 * @param string $pCoord Coordinate address of the cell to delete
* @throws Exception * @throws Exception
*/ */
public function deleteCacheData($pCoord) { public function deleteCacheData($pCoord) {
if ($pCoord === $this->_currentObjectID) { 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() { public function getCellList() {
return array_keys($this->_cellCache); 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() { public function getSortedCellList() {
$sortKeys = array(); $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) { public function copyCellCollection(PHPExcel_Worksheet $parent) {
$this->_parent = $parent; $this->_parent = $parent;
@ -228,10 +228,10 @@ class PHPExcel_CachedObjectStorage_CacheBase {
/** /**
* Identify whether the caching method is currently available * Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build * Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* *
* @return boolean * @return boolean
*/ */
public static function cacheMethodIsAvailable() { public static function cacheMethodIsAvailable() {
return true; return true;

View File

@ -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 string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function addCacheData($pCoord, PHPExcel_Cell $cell) { public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { 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) { public function copyCellCollection(PHPExcel_Worksheet $parent) {
parent::copyCellCollection($parent); parent::copyCellCollection($parent);

View File

@ -36,76 +36,76 @@
interface PHPExcel_CachedObjectStorage_ICache 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 string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function addCacheData($pCoord, PHPExcel_Cell $cell); 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 * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function updateCacheData(PHPExcel_Cell $cell); 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 * @param string $pCoord Coordinate address of the cell to retrieve
* @return PHPExcel_Cell Cell that was found, or null if not found * @return PHPExcel_Cell Cell that was found, or null if not found
* @throws Exception * @throws Exception
*/ */
public function getCacheData($pCoord); 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 * @param string $pCoord Coordinate address of the cell to delete
* @throws Exception * @throws Exception
*/ */
public function deleteCacheData($pCoord); 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 * @param string $pCoord Coordinate address of the cell to check
* @return void * @return void
* @return boolean * @return boolean
*/ */
public function isDataSet($pCoord); 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(); 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(); public function getSortedCellList();
/** /**
* Clone the cell collection * Clone the cell collection
* *
* @return void * @return void
*/ */
public function copyCellCollection(PHPExcel_Worksheet $parent); public function copyCellCollection(PHPExcel_Worksheet $parent);
/** /**
* Identify whether the caching method is currently available * Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build * Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* *
* @return boolean * @return boolean
*/ */
public static function cacheMethodIsAvailable(); public static function cacheMethodIsAvailable();

View File

@ -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 string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function addCacheData($pCoord, PHPExcel_Cell $cell) { public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { 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 * Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build * Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* *
* @return boolean * @return boolean
*/ */
public static function cacheMethodIsAvailable() { public static function cacheMethodIsAvailable() {
if (!function_exists('igbinary_serialize')) { if (!function_exists('igbinary_serialize')) {

View File

@ -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 string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function addCacheData($pCoord, PHPExcel_Cell $cell) { public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { 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 * @param string $pCoord Coordinate address of the cell to check
* @return void * @return void
* @return boolean * @return boolean
*/ */
public function isDataSet($pCoord) { public function isDataSet($pCoord) {
// Check if the requested entry is the current object, or exists in the cache // 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 * @param string $pCoord Coordinate address of the cell to delete
* @throws Exception * @throws Exception
*/ */
public function deleteCacheData($pCoord) { public function deleteCacheData($pCoord) {
// Delete the entry from Memcache // 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) { public function copyCellCollection(PHPExcel_Worksheet $parent) {
parent::copyCellCollection($parent); parent::copyCellCollection($parent);
@ -238,10 +238,10 @@ class PHPExcel_CachedObjectStorage_Memcache extends PHPExcel_CachedObjectStorage
} // function __destruct() } // function __destruct()
/** /**
* Identify whether the caching method is currently available * Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build * Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* *
* @return boolean * @return boolean
*/ */
public static function cacheMethodIsAvailable() { public static function cacheMethodIsAvailable() {
if (!function_exists('memcache_add')) { if (!function_exists('memcache_add')) {

View File

@ -36,12 +36,12 @@
class PHPExcel_CachedObjectStorage_Memory extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache { 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 string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function addCacheData($pCoord, PHPExcel_Cell $cell) { public function addCacheData($pCoord, PHPExcel_Cell $cell) {
$this->_cellCache[$pCoord] = $cell; $this->_cellCache[$pCoord] = $cell;

View File

@ -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 string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function addCacheData($pCoord, PHPExcel_Cell $cell) { public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {

View File

@ -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 string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function addCacheData($pCoord, PHPExcel_Cell $cell) { public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {

View File

@ -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 string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function addCacheData($pCoord, PHPExcel_Cell $cell) { public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { 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) { public function copyCellCollection(PHPExcel_Worksheet $parent) {
parent::copyCellCollection($parent); parent::copyCellCollection($parent);

View File

@ -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 string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function addCacheData($pCoord, PHPExcel_Cell $cell) { public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { 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 * @param string $pCoord Coordinate address of the cell to check
* @return boolean * @return boolean
*/ */
public function isDataSet($pCoord) { public function isDataSet($pCoord) {
if ($pCoord === $this->_currentObjectID) { 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 * @param string $pCoord Coordinate address of the cell to delete
* @throws Exception * @throws Exception
*/ */
public function deleteCacheData($pCoord) { public function deleteCacheData($pCoord) {
if ($pCoord === $this->_currentObjectID) { 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() { public function getCellList() {
$query = "SELECT id FROM kvp_".$this->_TableName; $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) { public function copyCellCollection(PHPExcel_Worksheet $parent) {
// Get a new id for the new table name // 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 * Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build * Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* *
* @return boolean * @return boolean
*/ */
public static function cacheMethodIsAvailable() { public static function cacheMethodIsAvailable() {
if (!function_exists('sqlite_open')) { if (!function_exists('sqlite_open')) {

View File

@ -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 string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function addCacheData($pCoord, PHPExcel_Cell $cell) { public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { 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? * Is a value set for an indexed cell?
* *
* @param string $pCoord Coordinate address of the cell to check * @param string $pCoord Coordinate address of the cell to check
* @return boolean * @return boolean
*/ */
public function isDataSet($pCoord) { public function isDataSet($pCoord) {
if ($pCoord === $this->_currentObjectID) { if ($pCoord === $this->_currentObjectID) {
@ -136,8 +136,8 @@ class PHPExcel_CachedObjectStorage_SQLite3 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 * @param string $pCoord Coordinate address of the cell to delete
* @throws Exception * @throws Exception
*/ */
public function deleteCacheData($pCoord) { public function deleteCacheData($pCoord) {
if ($pCoord === $this->_currentObjectID) { 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() { public function getCellList() {
$query = "SELECT id FROM kvp_".$this->_TableName; $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) { public function copyCellCollection(PHPExcel_Worksheet $parent) {
// Get a new id for the new table name // 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 * Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build * Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* *
* @return boolean * @return boolean
*/ */
public static function cacheMethodIsAvailable() { public static function cacheMethodIsAvailable() {
if (!class_exists('SQLite3')) { if (!class_exists('SQLite3')) {

View File

@ -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 string $pCoord Coordinate address of the cell to update
* @param PHPExcel_Cell $cell Cell to update * @param PHPExcel_Cell $cell Cell to update
* @return void * @return void
* @throws Exception * @throws Exception
*/ */
public function addCacheData($pCoord, PHPExcel_Cell $cell) { public function addCacheData($pCoord, PHPExcel_Cell $cell) {
if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) { 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 * @param string $pCoord Coordinate address of the cell to check
* @return void * @return void
* @return boolean * @return boolean
*/ */
public function isDataSet($pCoord) { public function isDataSet($pCoord) {
// Check if the requested entry is the current object, or exists in the cache // 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 * @param string $pCoord Coordinate address of the cell to delete
* @throws Exception * @throws Exception
*/ */
public function deleteCacheData($pCoord) { public function deleteCacheData($pCoord) {
// Delete the entry from Wincache // 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) { public function copyCellCollection(PHPExcel_Worksheet $parent) {
parent::copyCellCollection($parent); parent::copyCellCollection($parent);
@ -233,10 +233,10 @@ class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage
/** /**
* Identify whether the caching method is currently available * Identify whether the caching method is currently available
* Some methods are dependent on the availability of certain extensions being enabled in the PHP build * Some methods are dependent on the availability of certain extensions being enabled in the PHP build
* *
* @return boolean * @return boolean
*/ */
public static function cacheMethodIsAvailable() { public static function cacheMethodIsAvailable() {
if (!function_exists('wincache_ucache_add')) { if (!function_exists('wincache_ucache_add')) {

View File

@ -61,8 +61,8 @@ if (!defined('CALCULATION_REGEXP_CELLREF')) {
*/ */
class PHPExcel_Calculation { class PHPExcel_Calculation {
/** Constants */ /** Constants */
/** Regular Expressions */ /** Regular Expressions */
// Numeric operand // Numeric operand
const CALCULATION_REGEXP_NUMBER = '[-+]?\d*\.?\d+(e[-+]?\d+)?'; const CALCULATION_REGEXP_NUMBER = '[-+]?\d*\.?\d+(e[-+]?\d+)?';
// String operand // String operand
@ -79,7 +79,7 @@ class PHPExcel_Calculation {
const CALCULATION_REGEXP_ERROR = '\#[A-Z][A-Z0_\/]*[!\?]?'; const CALCULATION_REGEXP_ERROR = '\#[A-Z][A-Z0_\/]*[!\?]?';
/** constants */ /** constants */
const RETURN_ARRAY_AS_ERROR = 'error'; const RETURN_ARRAY_AS_ERROR = 'error';
const RETURN_ARRAY_AS_VALUE = 'value'; const RETURN_ARRAY_AS_VALUE = 'value';
const RETURN_ARRAY_AS_ARRAY = 'array'; const RETURN_ARRAY_AS_ARRAY = 'array';
@ -88,47 +88,47 @@ class PHPExcel_Calculation {
/** /**
* Instance of this class * Instance of this class
* *
* @access private * @access private
* @var PHPExcel_Calculation * @var PHPExcel_Calculation
*/ */
private static $_instance; private static $_instance;
/** /**
* Calculation cache * Calculation cache
* *
* @access private * @access private
* @var array * @var array
*/ */
private static $_calculationCache = array (); private static $_calculationCache = array ();
/** /**
* Calculation cache enabled * Calculation cache enabled
* *
* @access private * @access private
* @var boolean * @var boolean
*/ */
private static $_calculationCacheEnabled = true; private static $_calculationCacheEnabled = true;
/** /**
* Calculation cache expiration time * Calculation cache expiration time
* *
* @access private * @access private
* @var float * @var float
*/ */
private static $_calculationCacheExpirationTime = 15; private static $_calculationCacheExpirationTime = 15;
/** /**
* List of operators that can be used within formulae * List of operators that can be used within formulae
* The true/false value indicates whether it is a binary operator or a unary operator * The true/false value indicates whether it is a binary operator or a unary operator
* *
* @access private * @access private
* @var array * @var array
*/ */
private static $_operators = array('+' => true, '-' => true, '*' => true, '/' => true, private static $_operators = array('+' => true, '-' => true, '*' => true, '/' => true,
'^' => true, '&' => true, '%' => false, '~' => false, '^' => 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 * @access private
* @var array * @var array
*/ */
private static $_binaryOperators = array('+' => true, '-' => true, '*' => true, '/' => true, private static $_binaryOperators = array('+' => true, '-' => true, '*' => true, '/' => true,
'^' => 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 true, then a user error will be triggered
* If false, then an exception will be thrown * If false, then an exception will be thrown
* *
* @access public * @access public
* @var boolean * @var boolean
* *
*/ */
public $suppressFormulaErrors = false; 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 * @access public
* @var string * @var string
* *
*/ */
public $formulaError = null; 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 true, then a debug log will be generated
* If false, then a debug log will not be generated * If false, then a debug log will not be generated
* *
* @access public * @access public
* @var boolean * @var boolean
* *
*/ */
public $writeDebugLog = false; 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 true, then a debug log will be echoed
* If false, then a debug log will not 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 * @access public
* @var boolean * @var boolean
* *
*/ */
public $echoDebugLog = false; 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 * @access private
* @var array of string * @var array of string
* *
*/ */
private $debugLogStack = array(); private $debugLogStack = array();
/** /**
* The debug log generated by the calculation engine * The debug log generated by the calculation engine
* *
* @access public * @access public
* @var array of string * @var array of string
* *
*/ */
public $debugLog = array(); public $debugLog = array();
@ -1704,10 +1704,10 @@ class PHPExcel_Calculation {
} }
/** /**
* Get an instance of this class * Get an instance of this class
* *
* @access public * @access public
* @return PHPExcel_Calculation * @return PHPExcel_Calculation
*/ */
public static function getInstance() { public static function getInstance() {
if (!isset(self::$_instance) || (self::$_instance === NULL)) { 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 * but only if a PHPExcel_Calculation instance exists
* *
* @access public * @access public
* @return null * @return null
*/ */
public static function flushInstance() { public static function flushInstance() {
if (isset(self::$_instance) && (self::$_instance !== NULL)) { 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 * @access public
* @throws Exception * @throws Exception
*/ */
public final function __clone() { public final function __clone() {
throw new Exception ('Cloning a Singleton is not allowed!'); 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 * @access public
* @return string locale-specific translation of TRUE * @return string locale-specific translation of TRUE
*/ */
public static function getTRUE() { public static function getTRUE() {
return self::$_localeBoolean['TRUE']; return self::$_localeBoolean['TRUE'];
} }
/** /**
* Return the locale-specific translation of FALSE * Return the locale-specific translation of FALSE
* *
* @access public * @access public
* @return string locale-specific translation of FALSE * @return string locale-specific translation of FALSE
*/ */
public static function getFALSE() { public static function getFALSE() {
return self::$_localeBoolean['FALSE']; 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 * @access public
* @param string $returnType Array return type * @param string $returnType Array return type
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setArrayReturnType($returnType) { public static function setArrayReturnType($returnType) {
if (($returnType == self::RETURN_ARRAY_AS_VALUE) || 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 * @access public
* @return string $returnType Array return type * @return string $returnType Array return type
*/ */
public static function getArrayReturnType() { public static function getArrayReturnType() {
return self::$returnArrayAsType; return self::$returnArrayAsType;
@ -1793,10 +1793,10 @@ class PHPExcel_Calculation {
/** /**
* Is calculation caching enabled? * Is calculation caching enabled?
* *
* @access public * @access public
* @return boolean * @return boolean
*/ */
public function getCalculationCacheEnabled() { public function getCalculationCacheEnabled() {
return self::$_calculationCacheEnabled; return self::$_calculationCacheEnabled;
@ -1804,10 +1804,10 @@ class PHPExcel_Calculation {
/** /**
* Enable/disable calculation cache * Enable/disable calculation cache
* *
* @access public * @access public
* @param boolean $pValue * @param boolean $pValue
*/ */
public function setCalculationCacheEnabled($pValue = true) { public function setCalculationCacheEnabled($pValue = true) {
self::$_calculationCacheEnabled = $pValue; self::$_calculationCacheEnabled = $pValue;
@ -1816,7 +1816,7 @@ class PHPExcel_Calculation {
/** /**
* Enable calculation cache * Enable calculation cache
*/ */
public function enableCalculationCache() { public function enableCalculationCache() {
$this->setCalculationCacheEnabled(true); $this->setCalculationCacheEnabled(true);
@ -1824,7 +1824,7 @@ class PHPExcel_Calculation {
/** /**
* Disable calculation cache * Disable calculation cache
*/ */
public function disableCalculationCache() { public function disableCalculationCache() {
$this->setCalculationCacheEnabled(false); $this->setCalculationCacheEnabled(false);
@ -1832,7 +1832,7 @@ class PHPExcel_Calculation {
/** /**
* Clear calculation cache * Clear calculation cache
*/ */
public function clearCalculationCache() { public function clearCalculationCache() {
self::$_calculationCache = array(); 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() { public function getCalculationCacheExpirationTime() {
return self::$_calculationCacheExpirationTime; 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) { public function setCalculationCacheExpirationTime($pValue = 15) {
self::$_calculationCacheExpirationTime = $pValue; 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() { public function getLocale() {
return self::$_localeLanguage; 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') { public function setLocale($locale='en_us') {
// Identify our locale and language // 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 * @param mixed $value
* @return mixed * @return mixed
*/ */
public static function _wrapResult($value) { public static function _wrapResult($value) {
if (is_string($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 * @param mixed $value
* @return mixed * @return mixed
*/ */
public static function _unwrapResult($value) { public static function _unwrapResult($value) {
if (is_string($value)) { if (is_string($value)) {
@ -2114,13 +2114,13 @@ class PHPExcel_Calculation {
/** /**
* Calculate cell value (using formula from a cell ID) * Calculate cell value (using formula from a cell ID)
* Retained for backward compatibility * Retained for backward compatibility
* *
* @access public * @access public
* @param PHPExcel_Cell $pCell Cell to calculate * @param PHPExcel_Cell $pCell Cell to calculate
* @return mixed * @return mixed
* @throws Exception * @throws Exception
*/ */
public function calculate(PHPExcel_Cell $pCell = null) { public function calculate(PHPExcel_Cell $pCell = null) {
try { try {
@ -2132,13 +2132,13 @@ class PHPExcel_Calculation {
/** /**
* Calculate the value of a cell formula * Calculate the value of a cell formula
* *
* @access public * @access public
* @param PHPExcel_Cell $pCell Cell to calculate * @param PHPExcel_Cell $pCell Cell to calculate
* @param Boolean $resetLog Flag indicating whether the debug log should be reset or not * @param Boolean $resetLog Flag indicating whether the debug log should be reset or not
* @return mixed * @return mixed
* @throws Exception * @throws Exception
*/ */
public function calculateCellValue(PHPExcel_Cell $pCell = null, $resetLog = true) { public function calculateCellValue(PHPExcel_Cell $pCell = null, $resetLog = true) {
if ($resetLog) { 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 * @param string $formula Formula to parse
* @return array * @return array
* @throws Exception * @throws Exception
*/ */
public function parseFormula($formula) { public function parseFormula($formula) {
// Basic validation that this is indeed a 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 * @param string $formula Formula to parse
* @return mixed * @return mixed
* @throws Exception * @throws Exception
*/ */
public function calculateFormula($formula, $cellID=null, PHPExcel_Cell $pCell = null) { public function calculateFormula($formula, $cellID=null, PHPExcel_Cell $pCell = null) {
// Initialise the logging settings // 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 $formula The formula to parse and calculate
* @param string $cellID The ID (e.g. A3) of the cell that we are calculating * @param string $cellID The ID (e.g. A3) of the cell that we are calculating
* @param PHPExcel_Cell $pCell Cell to calculate * @param PHPExcel_Cell $pCell Cell to calculate
* @return mixed * @return mixed
* @throws Exception * @throws Exception
*/ */
public function _calculateFormulaValue($formula, $cellID=null, PHPExcel_Cell $pCell = null) { public function _calculateFormulaValue($formula, $cellID=null, PHPExcel_Cell $pCell = null) {
// echo '<b>'.$cellID.'</b><br />'; // echo '<b>'.$cellID.'</b><br />';
@ -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 &$operand1 First matrix operand
* @param mixed &$operand2 Second matrix operand * @param mixed &$operand2 Second matrix operand
* @param integer $resize Flag indicating whether the matrices should be resized to match * @param integer $resize Flag indicating whether the matrices should be resized to match
* and (if so), whether the smaller dimension should grow or the * and (if so), whether the smaller dimension should grow or the
* larger should shrink. * larger should shrink.
* 0 = no resize * 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 * @param mixed &$matrix matrix operand
* @return array An array comprising the number of rows, and number of columns * @return array An array comprising the number of rows, and number of columns
*/ */
public static function _getMatrixDimensions(&$matrix) { public static function _getMatrixDimensions(&$matrix) {
$matrixRows = count($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 &$matrix1 First matrix operand
* @param mixed &$matrix2 Second matrix operand * @param mixed &$matrix2 Second matrix operand
*/ */
private static function _resizeMatricesShrink(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) { private static function _resizeMatricesShrink(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) {
if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { 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 &$matrix1 First matrix operand
* @param mixed &$matrix2 Second matrix operand * @param mixed &$matrix2 Second matrix operand
*/ */
private static function _resizeMatricesExtend(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) { private static function _resizeMatricesExtend(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) {
if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { 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 * @param mixed $value First matrix operand
* @return mixed * @return mixed
*/ */
private function _showValue($value) { private function _showValue($value) {
if ($this->writeDebugLog) { 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 * @param mixed $value First matrix operand
* @return mixed * @return mixed
*/ */
private function _showTypeDetails($value) { private function _showTypeDetails($value) {
if ($this->writeDebugLog) { if ($this->writeDebugLog) {

View File

@ -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 * 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 * 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. * 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 $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 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 integer $method Method used for the calculation
* 0 or omitted US (NASD) 30/360 * 0 or omitted US (NASD) 30/360
* 1 Actual/actual * 1 Actual/actual
* 2 Actual/360 * 2 Actual/360
* 3 Actual/365 * 3 Actual/365
* 4 European 30/360 * 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) { public static function YEARFRAC($startDate = 0, $endDate = 0, $method = 0) {
$startDate = PHPExcel_Calculation_Functions::flattenSingleValue($startDate); $startDate = PHPExcel_Calculation_Functions::flattenSingleValue($startDate);

View File

@ -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 * 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 $x
* @param float $n * @param float $n
@ -789,7 +789,7 @@ class PHPExcel_Calculation_Engineering {
* *
* Returns the Bessel function * 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 $x
* @param float $n * @param float $n

View File

@ -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 issue The security's issue date.
* @param mixed firstinter The security's first interest date. * @param mixed firstinter The security's first interest date.
* @param mixed settlement The security's settlement date. * @param mixed settlement The security's settlement date.
* @param float rate The security's annual coupon rate. * @param float rate The security's annual coupon rate.
* @param float par The security's par value. * @param float par The security's par value.
* @param int basis The type of day count to use. * @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360 * 0 or omitted US (NASD) 30/360
* 1 Actual/actual * 1 Actual/actual
* 2 Actual/360 * 2 Actual/360
* 3 Actual/365 * 3 Actual/365
* 4 European 30/360 * 4 European 30/360
* @return float * @return float
*/ */
public static function ACCRINT($issue, $firstinter, $settlement, $rate, $par=1000, $frequency=1, $basis=0) { public static function ACCRINT($issue, $firstinter, $settlement, $rate, $par=1000, $frequency=1, $basis=0) {
$issue = PHPExcel_Calculation_Functions::flattenSingleValue($issue); $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 issue The security's issue date.
* @param mixed settlement The security's settlement date. * @param mixed settlement The security's settlement date.
* @param float rate The security's annual coupon rate. * @param float rate The security's annual coupon rate.
* @param float par The security's par value. * @param float par The security's par value.
* @param int basis The type of day count to use. * @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360 * 0 or omitted US (NASD) 30/360
* 1 Actual/actual * 1 Actual/actual
* 2 Actual/360 * 2 Actual/360
* 3 Actual/365 * 3 Actual/365
* 4 European 30/360 * 4 European 30/360
* @return float * @return float
*/ */
public static function ACCRINTM($issue, $settlement, $rate, $par=1000, $basis=0) { public static function ACCRINTM($issue, $settlement, $rate, $par=1000, $basis=0) {
$issue = PHPExcel_Calculation_Functions::flattenSingleValue($issue); $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 float $rate Interest rate per period
* @param int $nper Number of periods * @param int $nper Number of periods
* @param float $pv Present Value * @param float $pv Present Value
* @param int start The first period in the calculation. * @param int start The first period in the calculation.
* Payment periods are numbered beginning with 1. * Payment periods are numbered beginning with 1.
* @param int end The last period in the calculation. * @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 * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float * @return float
*/ */
public static function CUMIPMT($rate, $nper, $pv, $start, $end, $type = 0) { public static function CUMIPMT($rate, $nper, $pv, $start, $end, $type = 0) {
$rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); $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 float $rate Interest rate per period
* @param int $nper Number of periods * @param int $nper Number of periods
* @param float $pv Present Value * @param float $pv Present Value
* @param int start The first period in the calculation. * @param int start The first period in the calculation.
* Payment periods are numbered beginning with 1. * Payment periods are numbered beginning with 1.
* @param int end The last period in the calculation. * @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 * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float * @return float
*/ */
public static function CUMPRINC($rate, $nper, $pv, $start, $end, $type = 0) { public static function CUMPRINC($rate, $nper, $pv, $start, $end, $type = 0) {
$rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); $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. * 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 * 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 * (as opposed to linear depreciation). The depreciation value is reduced with every depreciation period by the
* depreciation already deducted from the initial cost. * depreciation already deducted from the initial cost.
* *
* @param float cost Initial cost of the asset. * @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 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 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 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. * @param float month Number of months in the first year. If month is omitted, it defaults to 12.
* @return float * @return float
*/ */
public static function DB($cost, $salvage, $life, $period, $month=12) { public static function DB($cost, $salvage, $life, $period, $month=12) {
$cost = (float) PHPExcel_Calculation_Functions::flattenSingleValue($cost); $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 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 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 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 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 factor The rate at which the balance declines.
* If factor is omitted, it is assumed to be 2 (the double-declining balance method). * 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) { public static function DDB($cost, $salvage, $life, $period, $factor=2.0) {
$cost = (float) PHPExcel_Calculation_Functions::flattenSingleValue($cost); $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. * 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. * The maturity date is the date when the security expires.
* @param int price The security's price per $100 face value. * @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 redemption the security's redemption value per $100 face value.
* @param int basis The type of day count to use. * @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360 * 0 or omitted US (NASD) 30/360
* 1 Actual/actual * 1 Actual/actual
* 2 Actual/360 * 2 Actual/360
* 3 Actual/365 * 3 Actual/365
* 4 European 30/360 * 4 European 30/360
* @return float * @return float
*/ */
public static function DISC($settlement, $maturity, $price, $redemption, $basis=0) { public static function DISC($settlement, $maturity, $price, $redemption, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); $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. * 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. * The maturity date is the date when the security expires.
* @param int investment The amount invested in the security. * @param int investment The amount invested in the security.
* @param int redemption The amount to be received at maturity. * @param int redemption The amount to be received at maturity.
* @param int basis The type of day count to use. * @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360 * 0 or omitted US (NASD) 30/360
* 1 Actual/actual * 1 Actual/actual
* 2 Actual/360 * 2 Actual/360
* 3 Actual/365 * 3 Actual/365
* 4 European 30/360 * 4 European 30/360
* @return float * @return float
*/ */
public static function INTRATE($settlement, $maturity, $investment, $redemption, $basis=0) { public static function INTRATE($settlement, $maturity, $investment, $redemption, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); $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 float $rate Interest rate per period
* @param int $per Period for which we want to find the interest * @param int $per Period for which we want to find the interest
* @param int $nper Number of periods * @param int $nper Number of periods
* @param float $pv Present Value * @param float $pv Present Value
* @param float $fv Future 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 * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float * @return float
*/ */
public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) { public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) {
$rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); $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. * 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 float $rate Interest rate per period
* @param int $pmt Periodic payment (annuity) * @param int $pmt Periodic payment (annuity)
* @param float $pv Present Value * @param float $pv Present Value
* @param float $fv Future 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 * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float * @return float
*/ */
public static function NPER($rate = 0, $pmt = 0, $pv = 0, $fv = 0, $type = 0) { public static function NPER($rate = 0, $pmt = 0, $pv = 0, $fv = 0, $type = 0) {
$rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); $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 float $rate Interest rate per period
* @param int $per Period for which we want to find the interest * @param int $per Period for which we want to find the interest
* @param int $nper Number of periods * @param int $nper Number of periods
* @param float $pv Present Value * @param float $pv Present Value
* @param float $fv Future 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 * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
* @return float * @return float
*/ */
public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) { public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) {
$rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); $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. * 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. * The maturity date is the date when the security expires.
* @param int discount The security's discount rate. * @param int discount The security's discount rate.
* @param int redemption The security's redemption value 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 basis The type of day count to use.
* 0 or omitted US (NASD) 30/360 * 0 or omitted US (NASD) 30/360
* 1 Actual/actual * 1 Actual/actual
* 2 Actual/360 * 2 Actual/360
* 3 Actual/365 * 3 Actual/365
* 4 European 30/360 * 4 European 30/360
* @return float * @return float
*/ */
public static function PRICEDISC($settlement, $maturity, $discount, $redemption, $basis=0) { public static function PRICEDISC($settlement, $maturity, $discount, $redemption, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); $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. * 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. * The maturity date is the date when the security expires.
* @param mixed issue The security's issue date. * @param mixed issue The security's issue date.
* @param int rate The security's interest rate at date of issue. * @param int rate The security's interest rate at date of issue.
* @param int yield The security's annual yield. * @param int yield The security's annual yield.
* @param int basis The type of day count to use. * @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360 * 0 or omitted US (NASD) 30/360
* 1 Actual/actual * 1 Actual/actual
* 2 Actual/360 * 2 Actual/360
* 3 Actual/365 * 3 Actual/365
* 4 European 30/360 * 4 European 30/360
* @return float * @return float
*/ */
public static function PRICEMAT($settlement, $maturity, $issue, $rate, $yield, $basis=0) { public static function PRICEMAT($settlement, $maturity, $issue, $rate, $yield, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); $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. * 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. * The maturity date is the date when the security expires.
* @param int investment The amount invested in the security. * @param int investment The amount invested in the security.
* @param int discount The security's discount rate. * @param int discount The security's discount rate.
* @param int basis The type of day count to use. * @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360 * 0 or omitted US (NASD) 30/360
* 1 Actual/actual * 1 Actual/actual
* 2 Actual/360 * 2 Actual/360
* 3 Actual/365 * 3 Actual/365
* 4 European 30/360 * 4 European 30/360
* @return float * @return float
*/ */
public static function RECEIVED($settlement, $maturity, $investment, $discount, $basis=0) { public static function RECEIVED($settlement, $maturity, $investment, $discount, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); $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. * 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. * The maturity date is the date when the Treasury bill expires.
* @param int discount The Treasury bill's discount rate. * @param int discount The Treasury bill's discount rate.
* @return float * @return float
*/ */
public static function TBILLEQ($settlement, $maturity, $discount) { public static function TBILLEQ($settlement, $maturity, $discount) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); $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. * 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. * The maturity date is the date when the Treasury bill expires.
* @param int discount The Treasury bill's discount rate. * @param int discount The Treasury bill's discount rate.
* @return float * @return float
*/ */
public static function TBILLPRICE($settlement, $maturity, $discount) { public static function TBILLPRICE($settlement, $maturity, $discount) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); $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. * 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. * The maturity date is the date when the Treasury bill expires.
* @param int price The Treasury bill's price per $100 face value. * @param int price The Treasury bill's price per $100 face value.
* @return float * @return float
*/ */
public static function TBILLYIELD($settlement, $maturity, $price) { public static function TBILLYIELD($settlement, $maturity, $price) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); $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. * 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. * 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) * =XNPV(rate,values,dates)
* *
* @param float $rate The discount rate to apply to the cash flows. * @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 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. * @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 * @return float
*/ */
public static function XNPV($rate, $values, $dates) { public static function XNPV($rate, $values, $dates) {
$rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); $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. * 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. * The maturity date is the date when the security expires.
* @param int price The security's price per $100 face value. * @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 redemption The security's redemption value per $100 face value.
* @param int basis The type of day count to use. * @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360 * 0 or omitted US (NASD) 30/360
* 1 Actual/actual * 1 Actual/actual
* 2 Actual/360 * 2 Actual/360
* 3 Actual/365 * 3 Actual/365
* 4 European 30/360 * 4 European 30/360
* @return float * @return float
*/ */
public static function YIELDDISC($settlement, $maturity, $price, $redemption, $basis=0) { public static function YIELDDISC($settlement, $maturity, $price, $redemption, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); $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. * 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. * The maturity date is the date when the security expires.
* @param mixed issue The security's issue date. * @param mixed issue The security's issue date.
* @param int rate The security's interest rate at date of issue. * @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 price The security's price per $100 face value.
* @param int basis The type of day count to use. * @param int basis The type of day count to use.
* 0 or omitted US (NASD) 30/360 * 0 or omitted US (NASD) 30/360
* 1 Actual/actual * 1 Actual/actual
* 2 Actual/360 * 2 Actual/360
* 3 Actual/365 * 3 Actual/365
* 4 European 30/360 * 4 European 30/360
* @return float * @return float
*/ */
public static function YIELDMAT($settlement, $maturity, $issue, $rate, $price, $basis=0) { public static function YIELDMAT($settlement, $maturity, $issue, $rate, $price, $basis=0) {
$settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement);

View File

@ -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 * @access private
* @var string * @var string
*/ */
protected static $compatibilityMode = self::COMPATIBILITY_EXCEL; protected static $compatibilityMode = self::COMPATIBILITY_EXCEL;
/** /**
* Data Type to use when returning date values * Data Type to use when returning date values
* *
* @access private * @access private
* @var string * @var string
*/ */
protected static $ReturnDateType = self::RETURNDATE_EXCEL; protected static $ReturnDateType = self::RETURNDATE_EXCEL;
/** /**
* List of error codes * List of error codes
* *
* @access private * @access private
* @var array * @var array
*/ */
protected static $_errorCodes = array( 'null' => '#NULL!', protected static $_errorCodes = array( 'null' => '#NULL!',
'divisionbyzero' => '#DIV/0!', 'divisionbyzero' => '#DIV/0!',
@ -102,16 +102,16 @@ class PHPExcel_Calculation_Functions {
/** /**
* Set the Compatibility Mode * Set the Compatibility Mode
* *
* @access public * @access public
* @category Function Configuration * @category Function Configuration
* @param string $compatibilityMode Compatibility Mode * @param string $compatibilityMode Compatibility Mode
* Permitted values are: * Permitted values are:
* PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL 'Excel' * PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL 'Excel'
* PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' * PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC 'Gnumeric'
* PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc' * PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc'
* @return boolean (Success or Failure) * @return boolean (Success or Failure)
*/ */
public static function setCompatibilityMode($compatibilityMode) { public static function setCompatibilityMode($compatibilityMode) {
if (($compatibilityMode == self::COMPATIBILITY_EXCEL) || 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 * @access public
* @category Function Configuration * @category Function Configuration
* @return string Compatibility Mode * @return string Compatibility Mode
* Possible Return values are: * Possible Return values are:
* PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL 'Excel' * PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL 'Excel'
* PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' * 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 * @access public
* @category Function Configuration * @category Function Configuration
* @param string $returnDateType Return Date Format * @param string $returnDateType Return Date Format
* Permitted values are: * Permitted values are:
* PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC 'P' * PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC 'P'
* PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT 'O' * PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT 'O'
* PHPExcel_Calculation_Functions::RETURNDATE_EXCEL 'E' * PHPExcel_Calculation_Functions::RETURNDATE_EXCEL 'E'
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setReturnDateType($returnDateType) { public static function setReturnDateType($returnDateType) {
if (($returnDateType == self::RETURNDATE_PHP_NUMERIC) || 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 * @access public
* @category Function Configuration * @category Function Configuration
* @return string Return Date Format * @return string Return Date Format
* Possible Return values are: * Possible Return values are:
* PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC 'P' * PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC 'P'
* PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT 'O' * PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT 'O'
@ -180,11 +180,11 @@ class PHPExcel_Calculation_Functions {
/** /**
* DUMMY * DUMMY
* *
* @access public * @access public
* @category Error Returns * @category Error Returns
* @return string #Not Yet Implemented * @return string #Not Yet Implemented
*/ */
public static function DUMMY() { public static function DUMMY() {
return '#Not Yet Implemented'; return '#Not Yet Implemented';
@ -192,11 +192,11 @@ class PHPExcel_Calculation_Functions {
/** /**
* DIV0 * DIV0
* *
* @access public * @access public
* @category Error Returns * @category Error Returns
* @return string #Not Yet Implemented * @return string #Not Yet Implemented
*/ */
public static function DIV0() { public static function DIV0() {
return self::$_errorCodes['divisionbyzero']; return self::$_errorCodes['divisionbyzero'];
@ -204,17 +204,17 @@ class PHPExcel_Calculation_Functions {
/** /**
* NA * NA
* *
* Excel Function: * Excel Function:
* =NA() * =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." * #N/A is the error value that means "no value is available."
* *
* @access public * @access public
* @category Logical Functions * @category Logical Functions
* @return string #N/A! * @return string #N/A!
*/ */
public static function NA() { public static function NA() {
return self::$_errorCodes['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 * @access public
* @category Error Returns * @category Error Returns
* @return string #NUM! * @return string #NUM!
*/ */
public static function NaN() { public static function NaN() {
return self::$_errorCodes['num']; 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 * @access public
* @category Error Returns * @category Error Returns
* @return string #NAME? * @return string #NAME?
*/ */
public static function NAME() { public static function NAME() {
return self::$_errorCodes['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 * @access public
* @category Error Returns * @category Error Returns
* @return string #REF! * @return string #REF!
*/ */
public static function REF() { public static function REF() {
return self::$_errorCodes['reference']; 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 * @access public
* @category Error Returns * @category Error Returns
* @return string #REF! * @return string #REF!
*/ */
public static function NULL() { public static function NULL() {
return self::$_errorCodes['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 * @access public
* @category Error Returns * @category Error Returns
* @return string #VALUE! * @return string #VALUE!
*/ */
public static function VALUE() { public static function VALUE() {
return self::$_errorCodes['value']; return self::$_errorCodes['value'];
@ -321,10 +321,10 @@ class PHPExcel_Calculation_Functions {
/** /**
* ERROR_TYPE * ERROR_TYPE
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function ERROR_TYPE($value = '') { public static function ERROR_TYPE($value = '') {
$value = self::flattenSingleValue($value); $value = self::flattenSingleValue($value);
@ -341,10 +341,10 @@ class PHPExcel_Calculation_Functions {
/** /**
* IS_BLANK * IS_BLANK
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function IS_BLANK($value = NULL) { public static function IS_BLANK($value = NULL) {
if (!is_null($value)) { if (!is_null($value)) {
@ -356,10 +356,10 @@ class PHPExcel_Calculation_Functions {
/** /**
* IS_ERR * IS_ERR
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function IS_ERR($value = '') { public static function IS_ERR($value = '') {
$value = self::flattenSingleValue($value); $value = self::flattenSingleValue($value);
@ -369,10 +369,10 @@ class PHPExcel_Calculation_Functions {
/** /**
* IS_ERROR * IS_ERROR
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function IS_ERROR($value = '') { public static function IS_ERROR($value = '') {
$value = self::flattenSingleValue($value); $value = self::flattenSingleValue($value);
@ -384,10 +384,10 @@ class PHPExcel_Calculation_Functions {
/** /**
* IS_NA * IS_NA
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function IS_NA($value = '') { public static function IS_NA($value = '') {
$value = self::flattenSingleValue($value); $value = self::flattenSingleValue($value);
@ -397,10 +397,10 @@ class PHPExcel_Calculation_Functions {
/** /**
* IS_EVEN * IS_EVEN
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function IS_EVEN($value = NULL) { public static function IS_EVEN($value = NULL) {
$value = self::flattenSingleValue($value); $value = self::flattenSingleValue($value);
@ -414,10 +414,10 @@ class PHPExcel_Calculation_Functions {
/** /**
* IS_ODD * IS_ODD
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function IS_ODD($value = NULL) { public static function IS_ODD($value = NULL) {
$value = self::flattenSingleValue($value); $value = self::flattenSingleValue($value);
@ -431,10 +431,10 @@ class PHPExcel_Calculation_Functions {
/** /**
* IS_NUMBER * IS_NUMBER
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function IS_NUMBER($value = NULL) { public static function IS_NUMBER($value = NULL) {
$value = self::flattenSingleValue($value); $value = self::flattenSingleValue($value);
@ -447,10 +447,10 @@ class PHPExcel_Calculation_Functions {
/** /**
* IS_LOGICAL * IS_LOGICAL
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function IS_LOGICAL($value = NULL) { public static function IS_LOGICAL($value = NULL) {
$value = self::flattenSingleValue($value); $value = self::flattenSingleValue($value);
@ -460,10 +460,10 @@ class PHPExcel_Calculation_Functions {
/** /**
* IS_TEXT * IS_TEXT
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function IS_TEXT($value = NULL) { public static function IS_TEXT($value = NULL) {
$value = self::flattenSingleValue($value); $value = self::flattenSingleValue($value);
@ -473,10 +473,10 @@ class PHPExcel_Calculation_Functions {
/** /**
* IS_NONTEXT * IS_NONTEXT
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function IS_NONTEXT($value = NULL) { public static function IS_NONTEXT($value = NULL) {
return !self::IS_TEXT($value); 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() { public static function VERSION() {
return 'PHPExcel ##VERSION##, ##DATE##'; 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 * @param value The value you want converted
* @return number N converts values listed in the following table * @return number N converts values listed in the following table
* If value is or refers to N returns * If value is or refers to N returns
* A number That number * A number That number
* A date The serial number of that date * 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 * @param value The value you want tested
* @return number N converts values listed in the following table * @return number N converts values listed in the following table
* If value is or refers to N returns * If value is or refers to N returns
* A number 1 * A number 1
* Text 2 * 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 * @param array $array Array to be flattened
* @return array Flattened array * @return array Flattened array
*/ */
public static function flattenArray($array) { public static function flattenArray($array) {
if (!is_array($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 * @param array $array Array to be flattened
* @return array Flattened array * @return array Flattened array
*/ */
public static function flattenArrayIndexed($array) { public static function flattenArrayIndexed($array) {
if (!is_array($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 * @param mixed $value Array or scalar value
* @return mixed * @return mixed
*/ */
public static function flattenSingleValue($value = '') { public static function flattenSingleValue($value = '') {
while (is_array($value)) { while (is_array($value)) {

View File

@ -46,16 +46,16 @@ if (!defined('PHPEXCEL_ROOT')) {
class PHPExcel_Calculation_Logical { class PHPExcel_Calculation_Logical {
/** /**
* TRUE * TRUE
* *
* Returns the boolean TRUE. * Returns the boolean TRUE.
* *
* Excel Function: * Excel Function:
* =TRUE() * =TRUE()
* *
* @access public * @access public
* @category Logical Functions * @category Logical Functions
* @return boolean True * @return boolean True
*/ */
public static function TRUE() { public static function TRUE() {
return 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() * =FALSE()
* *
* @access public * @access public
* @category Logical Functions * @category Logical Functions
* @return boolean False * @return boolean False
*/ */
public static function FALSE() { public static function FALSE() {
return 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[, ...]]) * =AND(logical1[,logical2[, ...]])
* *
* The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays * 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 * 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 * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
* *
* @access public * @access public
* @category Logical Functions * @category Logical Functions
* @param mixed $arg,... Data values * @param mixed $arg,... Data values
* @return boolean The logical AND of the arguments. * @return boolean The logical AND of the arguments.
*/ */
public static function LOGICAL_AND() { public static function LOGICAL_AND() {
// Return value // 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[, ...]]) * =OR(logical1[,logical2[, ...]])
* *
* The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays * 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 * 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 * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
* *
* @access public * @access public
* @category Logical Functions * @category Logical Functions
* @param mixed $arg,... Data values * @param mixed $arg,... Data values
* @return boolean The logical OR of the arguments. * @return boolean The logical OR of the arguments.
*/ */
public static function LOGICAL_OR() { public static function LOGICAL_OR() {
// Return value // 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) * =NOT(logical)
* *
* The argument must evaluate to a logical value such as TRUE or FALSE * 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 * 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 * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value
* *
* @access public * @access public
* @category Logical Functions * @category Logical Functions
* @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE * @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE
* @return boolean The boolean inverse of the argument. * @return boolean The boolean inverse of the argument.
*/ */
public static function NOT($logical=FALSE) { public static function NOT($logical=FALSE) {
$logical = PHPExcel_Calculation_Functions::flattenSingleValue($logical); $logical = PHPExcel_Calculation_Functions::flattenSingleValue($logical);
@ -226,11 +226,11 @@ class PHPExcel_Calculation_Logical {
} // function NOT() } // 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]]) * =IF(condition[,returnIfTrue[,returnIfFalse]])
* *
* Condition is any value or expression that can be evaluated to TRUE or FALSE. * 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. * If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned.
* ReturnIfFalse can be another formula. * ReturnIfFalse can be another formula.
* *
* @access public * @access public
* @category Logical Functions * @category Logical Functions
* @param mixed $condition Condition to evaluate * @param mixed $condition Condition to evaluate
* @param mixed $returnIfTrue Value to return when condition is true * @param mixed $returnIfTrue Value to return when condition is true
* @param mixed $returnIfFalse Optional value to return when condition is false * @param mixed $returnIfFalse Optional value to return when condition is false
* @return mixed The value of returnIfTrue or returnIfFalse determined by condition * @return mixed The value of returnIfTrue or returnIfFalse determined by condition
*/ */
public static function STATEMENT_IF($condition = TRUE, $returnIfTrue = 0, $returnIfFalse = FALSE) { public static function STATEMENT_IF($condition = TRUE, $returnIfTrue = 0, $returnIfFalse = FALSE) {
$condition = (is_null($condition)) ? TRUE : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($condition); $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) * =IFERROR(testValue,errorpart)
* *
* @access public * @access public
* @category Logical Functions * @category Logical Functions
* @param mixed $testValue Value to check, is also the value returned when no error * @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 * @param mixed $errorpart Value to return when testValue is an error condition
* @return mixed The value of errorpart or testValue determined by error condition * @return mixed The value of errorpart or testValue determined by error condition
*/ */
public static function IFERROR($testValue = '', $errorpart = '') { public static function IFERROR($testValue = '', $errorpart = '') {
$testValue = (is_null($testValue)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($testValue); $testValue = (is_null($testValue)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($testValue);

View File

@ -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]) * =ADDRESS(row, column, [relativity], [referenceStyle], [sheetText])
* *
* @param row Row number to use in the cell reference * @param row Row number to use in the cell reference
* @param column Column 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 relativity Flag indicating the type of reference to return
* 1 or omitted Absolute * 1 or omitted Absolute
* 2 Absolute row; relative column * 2 Absolute row; relative column
* 3 Relative row; absolute column * 3 Relative row; absolute column
* 4 Relative * 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 * TRUE or omitted CELL_ADDRESS returns an A1-style reference
* FALSE CELL_ADDRESS returns an R1C1-style reference * FALSE CELL_ADDRESS returns an R1C1-style reference
* @param sheetText Optional Name of worksheet to use * @param sheetText Optional Name of worksheet to use
* @return string * @return string
*/ */
public static function CELL_ADDRESS($row, $column, $relativity=1, $referenceStyle=True, $sheetText='') { public static function CELL_ADDRESS($row, $column, $relativity=1, $referenceStyle=True, $sheetText='') {
$row = PHPExcel_Calculation_Functions::flattenSingleValue($row); $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 * 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 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 * 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. * reference of the cell in which the COLUMN function appears; otherwise this function returns 0.
* *
* Excel Function: * Excel Function:
* =COLUMN([cellAddress]) * =COLUMN([cellAddress])
* *
* @param cellAddress A reference to a range of cells for which you want the column numbers * @param cellAddress A reference to a range of cells for which you want the column numbers
* @return integer or array of integer * @return integer or array of integer
*/ */
public static function COLUMN($cellAddress=Null) { public static function COLUMN($cellAddress=Null) {
if (is_null($cellAddress) || trim($cellAddress) === '') { return 0; } 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) * =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 * @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 * @return integer The number of columns in cellAddress
*/ */
public static function COLUMNS($cellAddress=Null) { public static function COLUMNS($cellAddress=Null) {
if (is_null($cellAddress) || $cellAddress === '') { if (is_null($cellAddress) || $cellAddress === '') {
@ -170,18 +170,18 @@ class PHPExcel_Calculation_LookupRef {
/** /**
* ROW * ROW
* *
* Returns the row number of the given cell reference * 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 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 * 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. * reference of the cell in which the ROW function appears; otherwise this function returns 0.
* *
* Excel Function: * Excel Function:
* =ROW([cellAddress]) * =ROW([cellAddress])
* *
* @param cellAddress A reference to a range of cells for which you want the row numbers * @param cellAddress A reference to a range of cells for which you want the row numbers
* @return integer or array of integer * @return integer or array of integer
*/ */
public static function ROW($cellAddress=Null) { public static function ROW($cellAddress=Null) {
if (is_null($cellAddress) || trim($cellAddress) === '') { return 0; } 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) * =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 * @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 * @return integer The number of rows in cellAddress
*/ */
public static function ROWS($cellAddress=Null) { public static function ROWS($cellAddress=Null) {
if (is_null($cellAddress) || $cellAddress === '') { if (is_null($cellAddress) || $cellAddress === '') {
@ -244,16 +244,16 @@ class PHPExcel_Calculation_LookupRef {
/** /**
* HYPERLINK * HYPERLINK
* *
* Excel Function: * Excel Function:
* =HYPERLINK(linkURL,displayName) * =HYPERLINK(linkURL,displayName)
* *
* @access public * @access public
* @category Logical Functions * @category Logical Functions
* @param string $linkURL Value to check, is also the value returned when no error * @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 * @param string $displayName Value to return when testValue is an error condition
* @return mixed The value of $displayName (or $linkURL if $displayName was blank) * @return mixed The value of $displayName (or $linkURL if $displayName was blank)
*/ */
public static function HYPERLINK($linkURL = '', $displayName = null, PHPExcel_Cell $pCell = null) { public static function HYPERLINK($linkURL = '', $displayName = null, PHPExcel_Cell $pCell = null) {
$args = func_get_args(); $args = func_get_args();
@ -277,20 +277,20 @@ class PHPExcel_Calculation_LookupRef {
/** /**
* INDIRECT * INDIRECT
* *
* Returns the reference specified by a text string. * Returns the reference specified by a text string.
* References are immediately evaluated to display their contents. * References are immediately evaluated to display their contents.
* *
* Excel Function: * Excel Function:
* =INDIRECT(cellAddress) * =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 * @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 * @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) { 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. * 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 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. * the number of columns to be returned.
* *
* Excel Function: * Excel Function:
* =OFFSET(cellAddress, rows, cols, [height], [width]) * =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. * 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 * 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) * five rows below reference. Rows can be positive (which means below the starting reference)
* or negative (which means above 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 * 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 * 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 * to the right of the starting reference) or negative (which means to the left of the
* starting reference). * 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 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. * @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 * @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) { public static function OFFSET($cellAddress=Null,$rows=0,$columns=0,$height=null,$width=null) {
$rows = PHPExcel_Calculation_Functions::flattenSingleValue($rows); $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. * 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. * Use CHOOSE to select one of up to 254 values based on the lookup_value.
* *
* Excel Function: * Excel Function:
* =CHOOSE(index_num, value1, [value2], ...) * =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 * 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. * 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 * 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 * index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or
* text. * text.
* @return mixed The selected value * @return mixed The selected value
*/ */
public static function CHOOSE() { public static function CHOOSE() {
$chooseArgs = func_get_args(); $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]) * =MATCH(lookup_value, lookup_array, [match_type])
* *
* @param lookup_value The value that you want to match in lookup_array * @param lookup_value The value that you want to match in lookup_array
* @param lookup_array The range of cells being searched * @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. * @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 * @return integer The relative position of the found item
*/ */
public static function MATCH($lookup_value, $lookup_array, $match_type=1) { public static function MATCH($lookup_value, $lookup_array, $match_type=1) {
$lookup_array = PHPExcel_Calculation_Functions::flattenArray($lookup_array); $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]) * =INDEX(range_array, row_num, [column_num])
* *
* @param range_array A range of cells or an array constant * @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 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. * @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 * @return mixed the value of a specified cell or array of cells
*/ */
public static function INDEX($arrayValues,$rowNum = 0,$columnNum = 0) { public static function INDEX($arrayValues,$rowNum = 0,$columnNum = 0) {

View File

@ -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 * calculating the arc tangent of y ÷ x, except that the signs of both arguments are used
* to determine the quadrant of the result. * 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 * point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between
* -pi and pi, excluding -pi. * -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. * PHP atan2() function, so we need to reverse them here before calling the PHP atan() function.
* *
* Excel Function: * Excel Function:
* ATAN2(xCoordinate,yCoordinate) * ATAN2(xCoordinate,yCoordinate)
* *
* @access public * @access public
* @category Mathematical and Trigonometric Functions * @category Mathematical and Trigonometric Functions
* @param float $xCoordinate The x-coordinate of the point. * @param float $xCoordinate The x-coordinate of the point.
* @param float $yCoordinate The y-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. * @return float The inverse tangent of the specified x- and y-coordinates.
*/ */
public static function ATAN2($xCoordinate, $yCoordinate) { public static function ATAN2($xCoordinate, $yCoordinate) {
$xCoordinate = (float) PHPExcel_Calculation_Functions::flattenSingleValue($xCoordinate); $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 $number Number to round
* @param float $significance Significance * @param float $significance Significance
* @return float Rounded Number * @return float Rounded Number
*/ */
public static function CEILING($number,$significance=null) { public static function CEILING($number,$significance=null) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number); $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 * 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. * determine the total possible number of groups for a given number of items.
* *
* @param int $numObjs Number of different objects * @param int $numObjs Number of different objects
* @param int $numInSet Number of objects in each combination * @param int $numInSet Number of objects in each combination
* @return int Number of combinations * @return int Number of combinations
*/ */
public static function COMBIN($numObjs,$numInSet) { public static function COMBIN($numObjs,$numInSet) {
$numObjs = PHPExcel_Calculation_Functions::flattenSingleValue($numObjs); $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 * @param float $number Number to round
* @return int Rounded Number * @return int Rounded Number
*/ */
public static function EVEN($number) { public static function EVEN($number) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($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 * @param float $factVal Factorial Value
* @return int Factorial * @return int Factorial
*/ */
public static function FACT($factVal) { public static function FACT($factVal) {
$factVal = PHPExcel_Calculation_Functions::flattenSingleValue($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 * @param float $factVal Factorial Value
* @return int Double Factorial * @return int Double Factorial
*/ */
public static function FACTDOUBLE($factVal) { public static function FACTDOUBLE($factVal) {
$factLoop = PHPExcel_Calculation_Functions::flattenSingleValue($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 $number Number to round
* @param float $significance Significance * @param float $significance Significance
* @return float Rounded Number * @return float Rounded Number
*/ */
public static function FLOOR($number,$significance=null) { public static function FLOOR($number,$significance=null) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number); $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 * @param $array Values to calculate the Greatest Common Divisor
* @return int Greatest Common Divisor * @return int Greatest Common Divisor
*/ */
public static function GCD() { public static function GCD() {
$returnValue = 1; $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 * @param float $number Number to cast to an integer
* @return integer Integer value * @return integer Integer value
*/ */
public static function INT($number) { public static function INT($number) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($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 * @param $array Values to calculate the Lowest Common Multiplier
* @return int Lowest Common Multiplier * @return int Lowest Common Multiplier
*/ */
public static function LCM() { public static function LCM() {
$returnValue = 1; $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]) * LOG(number[,base])
* *
* @access public * @access public
* @category Mathematical and Trigonometric Functions * @category Mathematical and Trigonometric Functions
* @param float $value The positive real number for which you want the logarithm * @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. * @param float $base The base of the logarithm. If base is omitted, it is assumed to be 10.
* @return float * @return float
*/ */
public static function LOG_BASE($number = NULL, $base=10) { public static function LOG_BASE($number = NULL, $base=10) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number); $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 float $number Number to round
* @param int $multiple Multiple to which you want to round $number * @param int $multiple Multiple to which you want to round $number
* @return float Rounded Number * @return float Rounded Number
*/ */
public static function MROUND($number,$multiple) { public static function MROUND($number,$multiple) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number); $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 * @param array of mixed Data Series
* @return float * @return float
*/ */
public static function MULTINOMIAL() { public static function MULTINOMIAL() {
$summer = 0; $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 * @param float $number Number to round
* @return int Rounded Number * @return int Rounded Number
*/ */
public static function ODD($number) { public static function ODD($number) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($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 $x
* @param float $y * @param float $y
* @return float * @return float
*/ */
public static function POWER($x = 0, $y = 2) { public static function POWER($x = 0, $y = 2) {
$x = PHPExcel_Calculation_Functions::flattenSingleValue($x); $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[, ...]]) * PRODUCT(value1[,value2[, ...]])
* *
* @access public * @access public
* @category Mathematical and Trigonometric Functions * @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values * @param mixed $arg,... Data values
* @return float * @return float
*/ */
public static function PRODUCT() { public static function PRODUCT() {
// Return value // 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. * and denominator is the divisor.
* *
* Excel Function: * Excel Function:
* QUOTIENT(value1[,value2[, ...]]) * QUOTIENT(value1[,value2[, ...]])
* *
* @access public * @access public
* @category Mathematical and Trigonometric Functions * @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values * @param mixed $arg,... Data values
* @return float * @return float
*/ */
public static function QUOTIENT() { public static function QUOTIENT() {
// Return value // 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 float $number Number to round
* @param int $digits Number of digits to which you want to round $number * @param int $digits Number of digits to which you want to round $number
* @return float Rounded Number * @return float Rounded Number
*/ */
public static function ROUNDUP($number,$digits) { public static function ROUNDUP($number,$digits) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number); $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 float $number Number to round
* @param int $digits Number of digits to which you want to round $number * @param int $digits Number of digits to which you want to round $number
* @return float Rounded Number * @return float Rounded Number
*/ */
public static function ROUNDDOWN($number,$digits) { public static function ROUNDDOWN($number,$digits) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($number); $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 $x Input value to the power series
* @param float $n Initial power to which you want to raise $x * @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 float $m Step by which to increase $n for each term in the series
* @param array of mixed Data Series * @param array of mixed Data Series
* @return float * @return float
*/ */
public static function SERIESSUM() { public static function SERIESSUM() {
// Return value // 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) * 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. * if the number is 0, and -1 if the number is negative.
* *
* @param float $number Number to round * @param float $number Number to round
* @return int sign value * @return int sign value
*/ */
public static function SIGN($number) { public static function SIGN($number) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($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 * @param float $number Number
* @return float Square Root of Number * Pi * @return float Square Root of Number * Pi
*/ */
public static function SQRTPI($number) { public static function SQRTPI($number) {
$number = PHPExcel_Calculation_Functions::flattenSingleValue($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. * use in calculating subtotals within a list.
* @param array of mixed Data Series * @param array of mixed Data Series
* @return float * @return float
*/ */
public static function SUBTOTAL() { public static function SUBTOTAL() {
$aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); $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[, ...]]) * SUM(value1[,value2[, ...]])
* *
* @access public * @access public
* @category Mathematical and Trigonometric Functions * @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values * @param mixed $arg,... Data values
* @return float * @return float
*/ */
public static function SUM() { public static function SUM() {
// Return value // 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) * SUMIF(value1[,value2[, ...]],condition)
* *
* @access public * @access public
* @category Mathematical and Trigonometric Functions * @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values * @param mixed $arg,... Data values
* @param string $condition The criteria that defines which cells will be summed. * @param string $condition The criteria that defines which cells will be summed.
* @return float * @return float
*/ */
public static function SUMIF($aArgs,$condition,$sumArgs = array()) { public static function SUMIF($aArgs,$condition,$sumArgs = array()) {
// Return value // 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[, ...]]) * SUMSQ(value1[,value2[, ...]])
* *
* @access public * @access public
* @category Mathematical and Trigonometric Functions * @category Mathematical and Trigonometric Functions
* @param mixed $arg,... Data values * @param mixed $arg,... Data values
* @return float * @return float
*/ */
public static function SUMSQ() { public static function SUMSQ() {
// Return value // 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 float $value
* @param int $digits * @param int $digits
* @return float Truncated value * @return float Truncated value
*/ */
public static function TRUNC($value = 0, $digits = 0) { public static function TRUNC($value = 0, $digits = 0) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value); $value = PHPExcel_Calculation_Functions::flattenSingleValue($value);

File diff suppressed because it is too large Load Diff

View File

@ -87,10 +87,10 @@ class PHPExcel_Calculation_TextData {
/** /**
* TRIMNONPRINTABLE * TRIMNONPRINTABLE
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return string * @return string
*/ */
public static function TRIMNONPRINTABLE($stringValue = '') { public static function TRIMNONPRINTABLE($stringValue = '') {
$stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue); $stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue);
@ -111,10 +111,10 @@ class PHPExcel_Calculation_TextData {
/** /**
* TRIMSPACES * TRIMSPACES
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return string * @return string
*/ */
public static function TRIMSPACES($stringValue = '') { public static function TRIMSPACES($stringValue = '') {
$stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($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. * 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).. * The format used is $#,##0.00_);($#,##0.00)..
* *
* @param float $value The value to format * @param float $value The value to format
* @param int $decimals The number of digits to display to the right of the decimal point. * @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 decimals is negative, number is rounded to the left of the decimal point.
* If you omit decimals, it is assumed to be 2 * If you omit decimals, it is assumed to be 2
* @return string * @return string
*/ */
public static function DOLLAR($value = 0, $decimals = 2) { public static function DOLLAR($value = 0, $decimals = 2) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value); $value = PHPExcel_Calculation_Functions::flattenSingleValue($value);
@ -288,10 +288,10 @@ class PHPExcel_Calculation_TextData {
/** /**
* FIXEDFORMAT * FIXEDFORMAT
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function FIXEDFORMAT($value, $decimals = 2, $no_commas = FALSE) { public static function FIXEDFORMAT($value, $decimals = 2, $no_commas = FALSE) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value); $value = PHPExcel_Calculation_Functions::flattenSingleValue($value);
@ -342,12 +342,12 @@ class PHPExcel_Calculation_TextData {
/** /**
* MID * MID
* *
* @param string $value Value * @param string $value Value
* @param int $start Start character * @param int $start Start character
* @param int $chars Number of characters * @param int $chars Number of characters
* @return string * @return string
*/ */
public static function MID($value = '', $start = 1, $chars = null) { public static function MID($value = '', $start = 1, $chars = null) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value); $value = PHPExcel_Calculation_Functions::flattenSingleValue($value);
@ -371,11 +371,11 @@ class PHPExcel_Calculation_TextData {
/** /**
* RIGHT * RIGHT
* *
* @param string $value Value * @param string $value Value
* @param int $chars Number of characters * @param int $chars Number of characters
* @return string * @return string
*/ */
public static function RIGHT($value = '', $chars = 1) { public static function RIGHT($value = '', $chars = 1) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value); $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 * @param string $mixedCaseString
* @return string * @return string
*/ */
public static function LOWERCASE($mixedCaseString) { public static function LOWERCASE($mixedCaseString) {
$mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($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 * @param string $mixedCaseString
* @return string * @return string
*/ */
public static function UPPERCASE($mixedCaseString) { public static function UPPERCASE($mixedCaseString) {
$mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($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 * @param string $mixedCaseString
* @return string * @return string
*/ */
public static function PROPERCASE($mixedCaseString) { public static function PROPERCASE($mixedCaseString) {
$mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString); $mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
@ -489,12 +489,12 @@ class PHPExcel_Calculation_TextData {
/** /**
* REPLACE * REPLACE
* *
* @param string $value Value * @param string $value Value
* @param int $start Start character * @param int $start Start character
* @param int $chars Number of characters * @param int $chars Number of characters
* @return string * @return string
*/ */
public static function REPLACE($oldText = '', $start = 1, $chars = null, $newText) { public static function REPLACE($oldText = '', $start = 1, $chars = null, $newText) {
$oldText = PHPExcel_Calculation_Functions::flattenSingleValue($oldText); $oldText = PHPExcel_Calculation_Functions::flattenSingleValue($oldText);
@ -510,13 +510,13 @@ class PHPExcel_Calculation_TextData {
/** /**
* SUBSTITUTE * SUBSTITUTE
* *
* @param string $text Value * @param string $text Value
* @param string $fromText From Value * @param string $fromText From Value
* @param string $toText To Value * @param string $toText To Value
* @param integer $instance Instance Number * @param integer $instance Instance Number
* @return string * @return string
*/ */
public static function SUBSTITUTE($text = '', $fromText = '', $toText = '', $instance = 0) { public static function SUBSTITUTE($text = '', $fromText = '', $toText = '', $instance = 0) {
$text = PHPExcel_Calculation_Functions::flattenSingleValue($text); $text = PHPExcel_Calculation_Functions::flattenSingleValue($text);
@ -557,10 +557,10 @@ class PHPExcel_Calculation_TextData {
/** /**
* RETURNSTRING * RETURNSTRING
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function RETURNSTRING($testValue = '') { public static function RETURNSTRING($testValue = '') {
$testValue = PHPExcel_Calculation_Functions::flattenSingleValue($testValue); $testValue = PHPExcel_Calculation_Functions::flattenSingleValue($testValue);
@ -573,10 +573,10 @@ class PHPExcel_Calculation_TextData {
/** /**
* TEXTFORMAT * TEXTFORMAT
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return boolean * @return boolean
*/ */
public static function TEXTFORMAT($value,$format) { public static function TEXTFORMAT($value,$format) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value); $value = PHPExcel_Calculation_Functions::flattenSingleValue($value);

View File

@ -37,49 +37,49 @@ class PHPExcel_Chart_DataSeriesValues
{ {
/** /**
* Series Data Type * Series Data Type
* *
* @var string * @var string
*/ */
private $_dataType = null; private $_dataType = null;
/** /**
* Series Data Source * Series Data Source
* *
* @var string * @var string
*/ */
private $_dataSource = null; private $_dataSource = null;
/** /**
* Format Code * Format Code
* *
* @var string * @var string
*/ */
private $_formatCode = null; private $_formatCode = null;
/** /**
* Series Point Marker * Series Point Marker
* *
* @var string * @var string
*/ */
private $_marker = null; 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; private $_pointCount = 0;
/** /**
* Data Values * Data Values
* *
* @var array of mixed * @var array of mixed
*/ */
private $_dataValues = array(); 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) 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() { public function getDataType() {
return $this->_dataType; return $this->_dataType;
} }
/** /**
* Set Series Data Type * Set Series Data Type
* *
* @param string $dataType * @param string $dataType
* @return PHPExcel_Chart_DataSeriesValues * @return PHPExcel_Chart_DataSeriesValues
*/ */
public function setDataType($dataType = 'Number') { public function setDataType($dataType = 'Number') {
$this->_dataType = $dataType; $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() { public function getDataSource() {
return $this->_dataSource; return $this->_dataSource;
} }
/** /**
* Set Series Data Source (formula) * Set Series Data Source (formula)
* *
* @param string $dataSource * @param string $dataSource
* @return PHPExcel_Chart_DataSeriesValues * @return PHPExcel_Chart_DataSeriesValues
*/ */
public function setDataSource($dataSource = null, $refreshDataValues = true) { public function setDataSource($dataSource = null, $refreshDataValues = true) {
$this->_dataSource = $dataSource; $this->_dataSource = $dataSource;
@ -138,19 +138,19 @@ class PHPExcel_Chart_DataSeriesValues
} }
/** /**
* Get Point Marker * Get Point Marker
* *
* @return string * @return string
*/ */
public function getPointMarker() { public function getPointMarker() {
return $this->_marker; return $this->_marker;
} }
/** /**
* Set Point Marker * Set Point Marker
* *
* @param string $marker * @param string $marker
* @return PHPExcel_Chart_DataSeriesValues * @return PHPExcel_Chart_DataSeriesValues
*/ */
public function setPointMarker($marker = null) { public function setPointMarker($marker = null) {
$this->_marker = $marker; $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() { public function getFormatCode() {
return $this->_formatCode; return $this->_formatCode;
} }
/** /**
* Set Series Format Code * Set Series Format Code
* *
* @param string $formatCode * @param string $formatCode
* @return PHPExcel_Chart_DataSeriesValues * @return PHPExcel_Chart_DataSeriesValues
*/ */
public function setFormatCode($formatCode = null) { public function setFormatCode($formatCode = null) {
$this->_formatCode = $formatCode; $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() { public function getPointCount() {
return $this->_pointCount; 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() { public function isMultiLevelSeries() {
if (count($this->_dataValues) > 0) { 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() { public function multiLevelCount() {
$levelCount = 0; $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() { public function getDataValues() {
return $this->_dataValues; return $this->_dataValues;
} }
/** /**
* Get the first Series Data value * Get the first Series Data value
* *
* @return mixed * @return mixed
*/ */
public function getDataValue() { public function getDataValue() {
$count = count($this->_dataValues); $count = count($this->_dataValues);
@ -238,13 +238,13 @@ class PHPExcel_Chart_DataSeriesValues
} }
/** /**
* Set Series Data Values * Set Series Data Values
* *
* @param array $dataValues * @param array $dataValues
* @param boolean $refreshDataSource * @param boolean $refreshDataSource
* TRUE - refresh the value of _dataSource based on the values of $dataValues * TRUE - refresh the value of _dataSource based on the values of $dataValues
* FALSE - don't change the value of _dataSource * FALSE - don't change the value of _dataSource
* @return PHPExcel_Chart_DataSeriesValues * @return PHPExcel_Chart_DataSeriesValues
*/ */
public function setDataValues($dataValues = array(), $refreshDataSource = true) { public function setDataValues($dataValues = array(), $refreshDataSource = true) {
$this->_dataValues = PHPExcel_Calculation_Functions::flattenArray($dataValues); $this->_dataValues = PHPExcel_Calculation_Functions::flattenArray($dataValues);

View File

@ -58,23 +58,23 @@ class PHPExcel_Chart_Legend
); );
/** /**
* Legend position * Legend position
* *
* @var string * @var string
*/ */
private $_position = self::POSITION_RIGHT; private $_position = self::POSITION_RIGHT;
/** /**
* Allow overlay of other elements? * Allow overlay of other elements?
* *
* @var boolean * @var boolean
*/ */
private $_overlay = true; private $_overlay = true;
/** /**
* Legend Layout * Legend Layout
* *
* @var PHPExcel_Chart_Layout * @var PHPExcel_Chart_Layout
*/ */
private $_layout = null; 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() { public function getPosition() {
return $this->_position; 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) { public function setPosition($position = self::POSITION_RIGHT) {
if (!in_array($position,self::$positionXref)) { 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() { public function getPositionXL() {
return array_search($this->_position,self::$positionXref); 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) { public function setPositionXL($positionXL = self::xlLegendPositionRight) {
if (!array_key_exists($positionXL,self::$positionXref)) { 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() { public function getOverlay() {
return $this->_overlay; 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) { public function setOverlay($value=false) {
$this->_overlay = $value; $this->_overlay = $value;
} }
/** /**
* Get Layout * Get Layout
* *
* @return PHPExcel_Chart_Layout * @return PHPExcel_Chart_Layout
*/ */
public function getLayout() { public function getLayout() {
return $this->_layout; return $this->_layout;

View File

@ -1,28 +1,28 @@
<?php <?php
/** /**
* PHPExcel * PHPExcel
* *
* Copyright (c) 2006 - 2012 PHPExcel * Copyright (c) 2006 - 2012 PHPExcel
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * version 2.1 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* *
* @category PHPExcel * @category PHPExcel
* @package PHPExcel * @package PHPExcel
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */

View File

@ -29,7 +29,7 @@
/** PHPExcel root directory */ /** PHPExcel root directory */
if (!defined('PHPEXCEL_ROOT')) { if (!defined('PHPEXCEL_ROOT')) {
/** /**
* @ignore * @ignore
*/ */
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../'); define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
@ -45,11 +45,11 @@ if (!defined('PHPEXCEL_ROOT')) {
class PHPExcel_IOFactory class PHPExcel_IOFactory
{ {
/** /**
* Search locations * Search locations
* *
* @var array * @var array
* @access private * @access private
* @static * @static
*/ */
private static $_searchLocations = array( private static $_searchLocations = array(
array( 'type' => 'IWriter', 'path' => 'PHPExcel/Writer/{0}.php', 'class' => 'PHPExcel_Writer_{0}' ), array( 'type' => 'IWriter', 'path' => 'PHPExcel/Writer/{0}.php', 'class' => 'PHPExcel_Writer_{0}' ),
@ -57,11 +57,11 @@ class PHPExcel_IOFactory
); );
/** /**
* Autoresolve classes * Autoresolve classes
* *
* @var array * @var array
* @access private * @access private
* @static * @static
*/ */
private static $_autoResolveClasses = array( private static $_autoResolveClasses = array(
'Excel2007', 'Excel2007',
@ -79,23 +79,23 @@ class PHPExcel_IOFactory
private function __construct() { } private function __construct() { }
/** /**
* Get search locations * Get search locations
* *
* @static * @static
* @access public * @access public
* @return array * @return array
*/ */
public static function getSearchLocations() { public static function getSearchLocations() {
return self::$_searchLocations; return self::$_searchLocations;
} // function getSearchLocations() } // function getSearchLocations()
/** /**
* Set search locations * Set search locations
* *
* @static * @static
* @access public * @access public
* @param array $value * @param array $value
* @throws Exception * @throws Exception
*/ */
public static function setSearchLocations($value) { public static function setSearchLocations($value) {
if (is_array($value)) { if (is_array($value)) {
@ -106,27 +106,27 @@ class PHPExcel_IOFactory
} // function setSearchLocations() } // function setSearchLocations()
/** /**
* Add search location * Add search location
* *
* @static * @static
* @access public * @access public
* @param string $type Example: IWriter * @param string $type Example: IWriter
* @param string $location Example: PHPExcel/Writer/{0}.php * @param string $location Example: PHPExcel/Writer/{0}.php
* @param string $classname Example: PHPExcel_Writer_{0} * @param string $classname Example: PHPExcel_Writer_{0}
*/ */
public static function addSearchLocation($type = '', $location = '', $classname = '') { public static function addSearchLocation($type = '', $location = '', $classname = '') {
self::$_searchLocations[] = array( 'type' => $type, 'path' => $location, 'class' => $classname ); self::$_searchLocations[] = array( 'type' => $type, 'path' => $location, 'class' => $classname );
} // function addSearchLocation() } // function addSearchLocation()
/** /**
* Create PHPExcel_Writer_IWriter * Create PHPExcel_Writer_IWriter
* *
* @static * @static
* @access public * @access public
* @param PHPExcel $phpExcel * @param PHPExcel $phpExcel
* @param string $writerType Example: Excel2007 * @param string $writerType Example: Excel2007
* @return PHPExcel_Writer_IWriter * @return PHPExcel_Writer_IWriter
* @throws Exception * @throws Exception
*/ */
public static function createWriter(PHPExcel $phpExcel, $writerType = '') { public static function createWriter(PHPExcel $phpExcel, $writerType = '') {
// Search type // Search type
@ -150,13 +150,13 @@ class PHPExcel_IOFactory
} // function createWriter() } // function createWriter()
/** /**
* Create PHPExcel_Reader_IReader * Create PHPExcel_Reader_IReader
* *
* @static * @static
* @access public * @access public
* @param string $readerType Example: Excel2007 * @param string $readerType Example: Excel2007
* @return PHPExcel_Reader_IReader * @return PHPExcel_Reader_IReader
* @throws Exception * @throws Exception
*/ */
public static function createReader($readerType = '') { public static function createReader($readerType = '') {
// Search type // Search type
@ -180,13 +180,13 @@ class PHPExcel_IOFactory
} // function createReader() } // function createReader()
/** /**
* Loads PHPExcel from file using automatic PHPExcel_Reader_IReader resolution * Loads PHPExcel from file using automatic PHPExcel_Reader_IReader resolution
* *
* @static * @static
* @access public * @access public
* @param string $pFileName * @param string $pFileName
* @return PHPExcel * @return PHPExcel
* @throws Exception * @throws Exception
*/ */
public static function load($pFilename) { public static function load($pFilename) {
$reader = self::createReaderForFile($pFilename); $reader = self::createReaderForFile($pFilename);
@ -194,13 +194,13 @@ class PHPExcel_IOFactory
} // function load() } // function load()
/** /**
* Identify file type using automatic PHPExcel_Reader_IReader resolution * Identify file type using automatic PHPExcel_Reader_IReader resolution
* *
* @static * @static
* @access public * @access public
* @param string $pFileName * @param string $pFileName
* @return string * @return string
* @throws Exception * @throws Exception
*/ */
public static function identify($pFilename) { public static function identify($pFilename) {
$reader = self::createReaderForFile($pFilename); $reader = self::createReaderForFile($pFilename);
@ -211,13 +211,13 @@ class PHPExcel_IOFactory
} // function identify() } // 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 * @static
* @access public * @access public
* @param string $pFileName * @param string $pFileName
* @return PHPExcel_Reader_IReader * @return PHPExcel_Reader_IReader
* @throws Exception * @throws Exception
*/ */
public static function createReaderForFile($pFilename) { public static function createReaderForFile($pFilename) {

View File

@ -45,84 +45,84 @@ if (!defined('PHPEXCEL_ROOT')) {
class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
{ {
/** /**
* Input encoding * Input encoding
* *
* @access private * @access private
* @var string * @var string
*/ */
private $_inputEncoding = 'UTF-8'; private $_inputEncoding = 'UTF-8';
/** /**
* Delimiter * Delimiter
* *
* @access private * @access private
* @var string * @var string
*/ */
private $_delimiter = ','; private $_delimiter = ',';
/** /**
* Enclosure * Enclosure
* *
* @access private * @access private
* @var string * @var string
*/ */
private $_enclosure = '"'; private $_enclosure = '"';
/** /**
* Line ending * Line ending
* *
* @access private * @access private
* @var string * @var string
*/ */
private $_lineEnding = PHP_EOL; private $_lineEnding = PHP_EOL;
/** /**
* Sheet index to read * Sheet index to read
* *
* @access private * @access private
* @var int * @var int
*/ */
private $_sheetIndex = 0; private $_sheetIndex = 0;
/** /**
* Load rows contiguously * Load rows contiguously
* *
* @access private * @access private
* @var int * @var int
*/ */
private $_contiguous = false; private $_contiguous = false;
/** /**
* Row counter for loading rows contiguously * Row counter for loading rows contiguously
* *
* @access private * @access private
* @var int * @var int
*/ */
private $_contiguousRow = -1; private $_contiguousRow = -1;
/** /**
* PHPExcel_Reader_IReadFilter instance * PHPExcel_Reader_IReadFilter instance
* *
* @access private * @access private
* @var PHPExcel_Reader_IReadFilter * @var PHPExcel_Reader_IReadFilter
*/ */
private $_readFilter = null; private $_readFilter = null;
/** /**
* Create a new PHPExcel_Reader_CSV * Create a new PHPExcel_Reader_CSV
*/ */
public function __construct() { public function __construct() {
$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter(); $this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
} // function __construct() } // function __construct()
/** /**
* Can the current PHPExcel_Reader_IReader read the file? * Can the current PHPExcel_Reader_IReader read the file?
* *
* @access public * @access public
* @param string $pFileName * @param string $pFileName
* @return boolean * @return boolean
* @throws Exception * @throws Exception
*/ */
public function canRead($pFilename) public function canRead($pFilename)
{ {
@ -135,12 +135,12 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function canRead() } // function canRead()
/** /**
* Loads PHPExcel from file * Loads PHPExcel from file
* *
* @access public * @access public
* @param string $pFilename * @param string $pFilename
* @return PHPExcel * @return PHPExcel
* @throws Exception * @throws Exception
*/ */
public function load($pFilename) public function load($pFilename)
{ {
@ -152,20 +152,20 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function load() } // function load()
/** /**
* Read filter * Read filter
* *
* @access public * @access public
* @return PHPExcel_Reader_IReadFilter * @return PHPExcel_Reader_IReadFilter
*/ */
public function getReadFilter() { public function getReadFilter() {
return $this->_readFilter; return $this->_readFilter;
} // function getReadFilter() } // function getReadFilter()
/** /**
* Set read filter * Set read filter
* *
* @access public * @access public
* @param PHPExcel_Reader_IReadFilter $pValue * @param PHPExcel_Reader_IReadFilter $pValue
*/ */
public function setReadFilter(PHPExcel_Reader_IReadFilter $pValue) { public function setReadFilter(PHPExcel_Reader_IReadFilter $pValue) {
$this->_readFilter = $pValue; $this->_readFilter = $pValue;
@ -173,10 +173,10 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setReadFilter() } // function setReadFilter()
/** /**
* Set input encoding * Set input encoding
* *
* @access public * @access public
* @param string $pValue Input encoding * @param string $pValue Input encoding
*/ */
public function setInputEncoding($pValue = 'UTF-8') public function setInputEncoding($pValue = 'UTF-8')
{ {
@ -185,10 +185,10 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setInputEncoding() } // function setInputEncoding()
/** /**
* Get input encoding * Get input encoding
* *
* @access public * @access public
* @return string * @return string
*/ */
public function getInputEncoding() public function getInputEncoding()
{ {
@ -196,13 +196,13 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function getInputEncoding() } // function getInputEncoding()
/** /**
* Loads PHPExcel from file into PHPExcel instance * Loads PHPExcel from file into PHPExcel instance
* *
* @access public * @access public
* @param string $pFilename * @param string $pFilename
* @param PHPExcel $objPHPExcel * @param PHPExcel $objPHPExcel
* @return PHPExcel * @return PHPExcel
* @throws Exception * @throws Exception
*/ */
public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel) public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
{ {
@ -297,21 +297,21 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function loadIntoExisting() } // function loadIntoExisting()
/** /**
* Get delimiter * Get delimiter
* *
* @access public * @access public
* @return string * @return string
*/ */
public function getDelimiter() { public function getDelimiter() {
return $this->_delimiter; return $this->_delimiter;
} // function getDelimiter() } // function getDelimiter()
/** /**
* Set delimiter * Set delimiter
* *
* @access public * @access public
* @param string $pValue Delimiter, defaults to , * @param string $pValue Delimiter, defaults to ,
* @return PHPExcel_Reader_CSV * @return PHPExcel_Reader_CSV
*/ */
public function setDelimiter($pValue = ',') { public function setDelimiter($pValue = ',') {
$this->_delimiter = $pValue; $this->_delimiter = $pValue;
@ -319,21 +319,21 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setDelimiter() } // function setDelimiter()
/** /**
* Get enclosure * Get enclosure
* *
* @access public * @access public
* @return string * @return string
*/ */
public function getEnclosure() { public function getEnclosure() {
return $this->_enclosure; return $this->_enclosure;
} // function getEnclosure() } // function getEnclosure()
/** /**
* Set enclosure * Set enclosure
* *
* @access public * @access public
* @param string $pValue Enclosure, defaults to " * @param string $pValue Enclosure, defaults to "
* @return PHPExcel_Reader_CSV * @return PHPExcel_Reader_CSV
*/ */
public function setEnclosure($pValue = '"') { public function setEnclosure($pValue = '"') {
if ($pValue == '') { if ($pValue == '') {
@ -344,21 +344,21 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setEnclosure() } // function setEnclosure()
/** /**
* Get line ending * Get line ending
* *
* @access public * @access public
* @return string * @return string
*/ */
public function getLineEnding() { public function getLineEnding() {
return $this->_lineEnding; return $this->_lineEnding;
} // function getLineEnding() } // function getLineEnding()
/** /**
* Set line ending * Set line ending
* *
* @access public * @access public
* @param string $pValue Line ending, defaults to OS line ending (PHP_EOL) * @param string $pValue Line ending, defaults to OS line ending (PHP_EOL)
* @return PHPExcel_Reader_CSV * @return PHPExcel_Reader_CSV
*/ */
public function setLineEnding($pValue = PHP_EOL) { public function setLineEnding($pValue = PHP_EOL) {
$this->_lineEnding = $pValue; $this->_lineEnding = $pValue;
@ -366,21 +366,21 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setLineEnding() } // function setLineEnding()
/** /**
* Get sheet index * Get sheet index
* *
* @access public * @access public
* @return int * @return int
*/ */
public function getSheetIndex() { public function getSheetIndex() {
return $this->_sheetIndex; return $this->_sheetIndex;
} // function getSheetIndex() } // function getSheetIndex()
/** /**
* Set sheet index * Set sheet index
* *
* @access public * @access public
* @param int $pValue Sheet index * @param int $pValue Sheet index
* @return PHPExcel_Reader_CSV * @return PHPExcel_Reader_CSV
*/ */
public function setSheetIndex($pValue = 0) { public function setSheetIndex($pValue = 0) {
$this->_sheetIndex = $pValue; $this->_sheetIndex = $pValue;
@ -388,10 +388,10 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setSheetIndex() } // function setSheetIndex()
/** /**
* Set Contiguous * Set Contiguous
* *
* @access public * @access public
* @param string $pValue Input encoding * @param string $pValue Input encoding
*/ */
public function setContiguous($contiguous = false) public function setContiguous($contiguous = false)
{ {
@ -404,10 +404,10 @@ class PHPExcel_Reader_CSV implements PHPExcel_Reader_IReader
} // function setInputEncoding() } // function setInputEncoding()
/** /**
* Get Contiguous * Get Contiguous
* *
* @access public * @access public
* @return boolean * @return boolean
*/ */
public function getContiguous() { public function getContiguous() {
return $this->_contiguous; return $this->_contiguous;

View File

@ -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 * @param string $pFileName
* @return boolean * @return boolean
* @throws Exception * @throws Exception
*/ */
public function canRead($pFilename) public function canRead($pFilename)
{ {

View File

@ -36,36 +36,36 @@ if (!defined('PHPEXCEL_ROOT')) {
} }
/** /**
* PHPExcel_Reader_Excel2007 * PHPExcel_Reader_Excel2007
* *
* @category PHPExcel * @category PHPExcel
* @package PHPExcel_Reader * @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
*/ */
class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
{ {
/** /**
* Read data only? * Read data only?
* Identifies whether the Reader should only read data values for cells, and ignore any formatting information; * 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 * or whether it should read both data and formatting
* *
* @var boolean * @var boolean
*/ */
private $_readDataOnly = false; private $_readDataOnly = false;
/** /**
* Read charts that are defined 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; * Identifies whether the Reader should read the definitions for any charts that exist in the workbook;
* *
* @var boolean * @var boolean
*/ */
private $_includeCharts = false; private $_includeCharts = false;
/** /**
* Restrict which sheets should 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. * 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; 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 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. * If false (the default) it will read data and formatting.
* *
* @return boolean * @return boolean
*/ */
public function getReadDataOnly() { public function getReadDataOnly() {
return $this->_readDataOnly; 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 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. * 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) { public function setReadDataOnly($pValue = false) {
$this->_readDataOnly = $pValue; $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. * 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. * 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. * If false (the default) it will ignore any charts defined in the workbook file.
* *
* @return boolean * @return boolean
*/ */
public function getIncludeCharts() { public function getIncludeCharts() {
return $this->_includeCharts; 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. * 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. * 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. * 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) { public function setIncludeCharts($pValue = false) {
$this->_includeCharts = (boolean) $pValue; $this->_includeCharts = (boolean) $pValue;
@ -144,11 +144,11 @@ class PHPExcel_Reader_Excel2007 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 * 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. * indicating that all worksheets in the workbook should be loaded.
* *
* @return mixed * @return mixed
*/ */
public function getLoadSheetsOnly() 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. * 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 * 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) 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. * Tells the Reader to load all worksheets from the workbook.
* *
* @return PHPExcel_Reader_Excel2007 * @return PHPExcel_Reader_Excel2007
*/ */
public function setLoadAllSheets() 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 * @param string $pFileName
* @return boolean * @return boolean
* @throws Exception * @throws Exception
*/ */
public function canRead($pFilename) public function canRead($pFilename)
{ {

View File

@ -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 * @category PHPExcel
* @package PHPExcel_Reader_Excel5 * @package PHPExcel_Reader_Excel5
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
*/ */
class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader 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; const XLS_Type_UNKNOWN = 0xffff;
/** /**
* Read data only? * Read data only?
* Identifies whether the Reader should only read data values for cells, and ignore any formatting information; * 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 * or whether it should read both data and formatting
* *
* @var boolean * @var boolean
*/ */
private $_readDataOnly = false; private $_readDataOnly = false;
/** /**
* Restrict which sheets should 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. * 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; 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 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. * If false (the default) it will read data and formatting.
* *
* @return boolean * @return boolean
*/ */
public function getReadDataOnly() 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 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. * 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) 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 * 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. * indicating that all worksheets in the workbook should be loaded.
* *
* @return mixed * @return mixed
*/ */
public function getLoadSheetsOnly() 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. * 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 * 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) 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. * Tells the Reader to load all worksheets from the workbook.
* *
* @return PHPExcel_Reader_Excel5 * @return PHPExcel_Reader_Excel5
*/ */
public function setLoadAllSheets() 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 * @param string $pFileName
* @return boolean * @return boolean
* @throws Exception * @throws Exception
*/ */
public function canRead($pFilename) public function canRead($pFilename)
{ {

View File

@ -36,28 +36,28 @@ if (!defined('PHPEXCEL_ROOT')) {
} }
/** /**
* PHPExcel_Reader_Gnumeric * PHPExcel_Reader_Gnumeric
* *
* @category PHPExcel * @category PHPExcel
* @package PHPExcel_Reader * @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
*/ */
class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader
{ {
/** /**
* Read data only? * Read data only?
* Identifies whether the Reader should only read data values for cells, and ignore any formatting information; * 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 * or whether it should read both data and formatting
* *
* @var boolean * @var boolean
*/ */
private $_readDataOnly = false; private $_readDataOnly = false;
/** /**
* Restrict which sheets should 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. * 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; 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 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. * If false (the default) it will read data and formatting.
* *
* @return boolean * @return boolean
*/ */
public function getReadDataOnly() { public function getReadDataOnly() {
return $this->_readDataOnly; 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 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. * 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) { public function setReadDataOnly($pValue = false) {
$this->_readDataOnly = $pValue; $this->_readDataOnly = $pValue;
@ -111,11 +111,11 @@ class PHPExcel_Reader_Gnumeric 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 * 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. * indicating that all worksheets in the workbook should be loaded.
* *
* @return mixed * @return mixed
*/ */
public function getLoadSheetsOnly() 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. * 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 * 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) 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. * Tells the Reader to load all worksheets from the workbook.
* *
* @return PHPExcel_Reader_Gnumeric * @return PHPExcel_Reader_Gnumeric
*/ */
public function setLoadAllSheets() 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 * @param string $pFileName
* @return boolean * @return boolean
* @throws Exception * @throws Exception
*/ */
public function canRead($pFilename) public function canRead($pFilename)
{ {

View File

@ -36,28 +36,28 @@ if (!defined('PHPEXCEL_ROOT')) {
} }
/** /**
* PHPExcel_Reader_OOCalc * PHPExcel_Reader_OOCalc
* *
* @category PHPExcel * @category PHPExcel
* @package PHPExcel_Reader * @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
*/ */
class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader
{ {
/** /**
* Read data only? * Read data only?
* Identifies whether the Reader should only read data values for cells, and ignore any formatting information; * 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 * or whether it should read both data and formatting
* *
* @var boolean * @var boolean
*/ */
private $_readDataOnly = false; private $_readDataOnly = false;
/** /**
* Restrict which sheets should 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. * 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; 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 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. * If false (the default) it will read data and formatting.
* *
* @return boolean * @return boolean
*/ */
public function getReadDataOnly() { public function getReadDataOnly() {
return $this->_readDataOnly; 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 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. * 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_OOCalc
* @return PHPExcel_Reader_OOCalc
*/ */
public function setReadDataOnly($pValue = false) { public function setReadDataOnly($pValue = false) {
$this->_readDataOnly = $pValue; $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 * 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. * indicating that all worksheets in the workbook should be loaded.
* *
* @return mixed * @return mixed
*/ */
public function getLoadSheetsOnly() 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. * 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 * 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) 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. * Tells the Reader to load all worksheets from the workbook.
* *
* @return PHPExcel_Reader_OOCalc * @return PHPExcel_Reader_OOCalc
*/ */
public function setLoadAllSheets() 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 * @param string $pFileName
* @return boolean * @return boolean
* @throws Exception * @throws Exception
*/ */
public function canRead($pFilename) public function canRead($pFilename)
{ {

View File

@ -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 * @param string $pFileName
* @return boolean * @return boolean
* @throws Exception * @throws Exception
*/ */
public function canRead($pFilename) public function canRead($pFilename)
{ {

View File

@ -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. * e.g.
* ZipArchive * ZipArchive
* *
* @var string * @var string
*/ */
private static $_zipClass = self::ZIPARCHIVE; 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. * e.g.
* jpgraph * jpgraph
* *
* @var string * @var string
*/ */
private static $_chartRendererName = NULL; 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; 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. * e.g.
* mPDF * mPDF
* *
* @var string * @var string
*/ */
private static $_pdfRendererName = NULL; 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; 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 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setZipClass($zipClass) { public static function setZipClass($zipClass) {
if (($zipClass === self::PCLZIP) || 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 * 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 * for Zip file management
* e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive * 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() { public static function getCacheStorageMethod() {
return PHPExcel_CachedObjectStorageFactory::$_cacheStorageMethod; 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() { public static function getCacheStorageClass() {
return PHPExcel_CachedObjectStorageFactory::$_cacheStorageClass; 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 string $method Name of the cacheing method
* @param array $arguments Optional configuration arguments for the cacheing method * @param array $arguments Optional configuration arguments for the cacheing method
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setCacheStorageMethod($method = PHPExcel_CachedObjectStorageFactory::cache_in_memory, public static function setCacheStorageMethod($method = PHPExcel_CachedObjectStorageFactory::cache_in_memory,
$arguments = array()) { $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") * @param string $locale The locale code to use (e.g. "fr" or "pt_br" or "en_uk")
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setLocale($locale='en_us') { public static function setLocale($locale='en_us') {
return PHPExcel_Calculation::getInstance()->setLocale($locale); return PHPExcel_Calculation::getInstance()->setLocale($locale);

View File

@ -31,8 +31,8 @@ class PHPExcel_Shared_OLE_PPS_Root extends PHPExcel_Shared_OLE_PPS
{ {
/** /**
* Directory for temporary files * Directory for temporary files
* @var string * @var string
*/ */
protected $_tmp_dir = NULL; protected $_tmp_dir = NULL;

View File

@ -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 * 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 = '$') public static function setCurrencyCode($pValue = '$')
{ {

View File

@ -535,11 +535,24 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
return $pChart; return $pChart;
} }
/**
* Return the count of charts on this worksheet
*
* @return int The number of charts
* @throws Exception
*/
public function getChartCount() public function getChartCount()
{ {
return count($this->_chartCollection); 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) public function getChartByIndex($index = null)
{ {
$chartCount = count($this->_chartCollection); $chartCount = count($this->_chartCollection);
@ -556,6 +569,12 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
return $this->_chartCollection[$index]; 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() public function getChartNames()
{ {
$chartNames = array(); $chartNames = array();
@ -565,6 +584,13 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
return $chartNames; return $chartNames;
} }
/**
* Get a chart by name
*
* @param string $chartName Chart name
* @return false|PHPExcel_Chart
* @throws Exception
*/
public function getChartByName($chartName = '') public function getChartByName($chartName = '')
{ {
$chartCount = count($this->_chartCollection); $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 * Get column dimension at a specific column by using numeric cell coordinates
* *
* @param string $pColumn Numeric column coordinate of the cell * @param string $pColumn Numeric column coordinate of the cell
* @param string $pRow Numeric row coordinate of the cell
* @return PHPExcel_Worksheet_ColumnDimension * @return PHPExcel_Worksheet_ColumnDimension
*/ */
public function getColumnDimensionByColumn($pColumn = 0) 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! * Set default style - should only be used by PHPExcel_IReader implementations!
* *
* @deprecated * @deprecated
* @param PHPExcel_Style $value * @param PHPExcel_Style $pValue
* @throws Exception * @throws Exception
* @return PHPExcel_Worksheet * @return PHPExcel_Worksheet
*/ */
@ -2221,7 +2246,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
/** /**
* Selected cell * Selected cell
* *
* @param string $pCell Cell (i.e. A1) * @param string $pCoordinate Cell (i.e. A1)
* @return PHPExcel_Worksheet * @return PHPExcel_Worksheet
*/ */
public function setSelectedCell($pCoordinate = 'A1') public function setSelectedCell($pCoordinate = 'A1')
@ -2588,7 +2613,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
/** /**
* Hyperlink at a specific coordinate exists? * Hyperlink at a specific coordinate exists?
* *
* @param string $pCellCoordinate * @param string $pCoordinate
* @return boolean * @return boolean
*/ */
public function hyperlinkExists($pCoordinate = 'A1') public function hyperlinkExists($pCoordinate = 'A1')
@ -2643,7 +2668,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
/** /**
* Data validation at a specific coordinate exists? * Data validation at a specific coordinate exists?
* *
* @param string $pCellCoordinate * @param string $pCoordinate
* @return boolean * @return boolean
*/ */
public function dataValidationExists($pCoordinate = 'A1') public function dataValidationExists($pCoordinate = 'A1')

View File

@ -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 * @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) { public function setIterateOnlyExistingCells($value = true) {
$this->_onlyExistingCells = $value; $this->_onlyExistingCells = $value;

View File

@ -214,7 +214,7 @@ class PHPExcel_Worksheet_PageSetup
* *
* @var boolean * @var boolean
*/ */
private $_fitToPage = false; private $_fitToPage = FALSE;
/** /**
* Fit To Height * Fit To Height
@ -251,28 +251,28 @@ class PHPExcel_Worksheet_PageSetup
* *
* @var boolean * @var boolean
*/ */
private $_horizontalCentered = false; private $_horizontalCentered = FALSE;
/** /**
* Center page vertically * Center page vertically
* *
* @var boolean * @var boolean
*/ */
private $_verticalCentered = false; private $_verticalCentered = FALSE;
/** /**
* Print area * Print area
* *
* @var string * @var string
*/ */
private $_printArea = null; private $_printArea = NULL;
/** /**
* First page number * First page number
* *
* @var int * @var int
*/ */
private $_firstPageNumber = null; private $_firstPageNumber = NULL;
/** /**
* Create a new PHPExcel_Worksheet_PageSetup * Create a new PHPExcel_Worksheet_PageSetup
@ -336,10 +336,10 @@ class PHPExcel_Worksheet_PageSetup
* Print scaling. Valid values range from 10 to 400 * Print scaling. Valid values range from 10 to 400
* This setting is overridden when fitToWidth and/or fitToHeight are in use * This setting is overridden when fitToWidth and/or fitToHeight are in use
* *
* @param int? $pValue * @param int? $pValue
* @param boolean $pUpdate Update fitToPage so scaling applies rather than fitToHeight / fitToWidth * @param boolean $pUpdate Update fitToPage so scaling applies rather than fitToHeight / fitToWidth
* @throws Exception
* @return PHPExcel_Worksheet_PageSetup * @return PHPExcel_Worksheet_PageSetup
* @throws Exception
*/ */
public function setScale($pValue = 100, $pUpdate = true) { public function setScale($pValue = 100, $pUpdate = true) {
// Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface, // 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 * @param boolean $pValue
* @return PHPExcel_Worksheet_PageSetup * @return PHPExcel_Worksheet_PageSetup
*/ */
public function setFitToPage($pValue = true) { public function setFitToPage($pValue = TRUE) {
$this->_fitToPage = $pValue; $this->_fitToPage = $pValue;
return $this; return $this;
} }
@ -391,10 +391,10 @@ class PHPExcel_Worksheet_PageSetup
* @param boolean $pUpdate Update fitToPage so it applies rather than scaling * @param boolean $pUpdate Update fitToPage so it applies rather than scaling
* @return PHPExcel_Worksheet_PageSetup * @return PHPExcel_Worksheet_PageSetup
*/ */
public function setFitToHeight($pValue = 1, $pUpdate = true) { public function setFitToHeight($pValue = 1, $pUpdate = TRUE) {
$this->_fitToHeight = $pValue; $this->_fitToHeight = $pValue;
if ($pUpdate) { if ($pUpdate) {
$this->_fitToPage = true; $this->_fitToPage = TRUE;
} }
return $this; return $this;
} }
@ -415,10 +415,10 @@ class PHPExcel_Worksheet_PageSetup
* @param boolean $pUpdate Update fitToPage so it applies rather than scaling * @param boolean $pUpdate Update fitToPage so it applies rather than scaling
* @return PHPExcel_Worksheet_PageSetup * @return PHPExcel_Worksheet_PageSetup
*/ */
public function setFitToWidth($pValue = 1, $pUpdate = true) { public function setFitToWidth($pValue = 1, $pUpdate = TRUE) {
$this->_fitToWidth = $pValue; $this->_fitToWidth = $pValue;
if ($pUpdate) { if ($pUpdate) {
$this->_fitToPage = true; $this->_fitToPage = TRUE;
} }
return $this; return $this;
} }
@ -499,7 +499,7 @@ class PHPExcel_Worksheet_PageSetup
/** /**
* Set Rows to repeat at top * 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 * @return PHPExcel_Worksheet_PageSetup
*/ */
public function setRowsToRepeatAtTop($pValue = null) { public function setRowsToRepeatAtTop($pValue = null) {
@ -564,12 +564,12 @@ class PHPExcel_Worksheet_PageSetup
/** /**
* Get print area * 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 * 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 * Otherwise, the specific range identified by the value of $index will be returned
* Print areas are numbered from 1 * Print areas are numbered from 1
* @throws Exception * @throws Exception
* @return string * @return string
*/ */
public function getPrintArea($index = 0) { public function getPrintArea($index = 0) {
if ($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 * 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 * Otherwise, existence of the range identified by the value of $index will be returned
* Print areas are numbered from 1 * Print areas are numbered from 1
* @return boolean * @return boolean
*/ */
public function isPrintAreaSet($index = 0) { public function isPrintAreaSet($index = 0) {
if ($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 * 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 * Otherwise, the range identified by the value of $index will be removed from the series
* Print areas are numbered from 1 * Print areas are numbered from 1
* @return PHPExcel_Worksheet_PageSetup * @return PHPExcel_Worksheet_PageSetup
*/ */
public function clearPrintArea($index = 0) { public function clearPrintArea($index = 0) {
if ($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 string $value
* @param int $index Identifier for a specific print area range allowing several ranges to be set * @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 * 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 * 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. * 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 * Specifying an index value of 0, will always append the new print range at the end of the
* list. * list.
* Print areas are numbered from 1 * 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 * 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 * 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) { public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) {
if (strpos($value,'!') !== false) { 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 string $value
* @param int $index Identifier for a specific print area range allowing several ranges to be set * @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 * A positive index will insert after that indexed entry in the print areas list, while a
* negative index will insert before the indexed entry. * 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 * Specifying an index value of 0, will always append the new print range at the end of the
* list. * list.
* Print areas are numbered from 1 * Print areas are numbered from 1
* @throws Exception * @return PHPExcel_Worksheet_PageSetup
* @return PHPExcel_Worksheet_PageSetup * @throws Exception
*/ */
public function addPrintArea($value, $index = -1) { public function addPrintArea($value, $index = -1) {
return $this->setPrintArea($value, $index, self::SETPRINTRANGE_INSERT); return $this->setPrintArea($value, $index, self::SETPRINTRANGE_INSERT);
} }
/** /**
* Set print area * Set print area
* *
* @param int $column1 Column 1 * @param int $column1 Column 1
* @param int $row1 Row 1 * @param int $row1 Row 1
* @param int $column2 Column 2 * @param int $column2 Column 2
* @param int $row2 Row 2 * @param int $row2 Row 2
* @param int $index Identifier for a specific print area range allowing several ranges to be set * @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 * 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 * 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. * overwrite working bacward through the print area to the list, with the last entry as -1.
* Specifying an index value of 0, will overwrite <b>all</b> existing print ranges. * Specifying an index value of 0, will overwrite <b>all</b> existing print ranges.
* When the method is "I"nsert, then a positive index will insert after that indexed entry in * 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. * 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 * Specifying an index value of 0, will always append the new print range at the end of the
* list. * list.
* Print areas are numbered from 1 * 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 * 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 * 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 setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) 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 $column1 Start Column for the print area
* @param int $row1 Row 1 * @param int $row1 Start Row for the print area
* @param int $column2 Column 2 * @param int $column2 End Column for the print area
* @param int $row2 Row 2 * @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 * @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 * A positive index will insert after that indexed entry in the print areas list, while a
* negative index will insert before the indexed entry. * 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 * Specifying an index value of 0, will always append the new print range at the end of the
* list. * list.
* Print areas are numbered from 1 * 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) public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1)
{ {

View File

@ -36,10 +36,10 @@
class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter class PHPExcel_Writer_Excel2007 implements PHPExcel_Writer_IWriter
{ {
/** /**
* Write charts that are defined in the workbook? * Write charts that are defined in the workbook?
* Identifies whether the Writer should write definitions for any charts that exist in the PHPExcel object; * Identifies whether the Writer should write definitions for any charts that exist in the PHPExcel object;
* *
* @var boolean * @var boolean
*/ */
private $_includeCharts = false; 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 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. * If false (the default) it will ignore any charts defined in the PHPExcel object.
* *
* @return boolean * @return boolean
*/ */
public function getIncludeCharts() { public function getIncludeCharts() {
return $this->_includeCharts; 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 true, to advise the Writer to include any charts that exist in the PHPExcel object.
* Set to false (the default) to ignore charts. * 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) { public function setIncludeCharts($pValue = false) {
$this->_includeCharts = (boolean) $pValue; $this->_includeCharts = (boolean) $pValue;

View File

@ -108,6 +108,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
return $objWriter->getData(); 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) private function _writeTitle(PHPExcel_Chart_Title $title = null, $objWriter)
{ {
if (is_null($title)) { if (is_null($title)) {
@ -145,6 +152,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement(); $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) private function _writeLegend(PHPExcel_Chart_Legend $legend = null, $objWriter)
{ {
if (is_null($legend)) { if (is_null($legend)) {
@ -189,6 +203,15 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement(); $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, private function _writePlotArea(PHPExcel_Chart_PlotArea $plotArea,
PHPExcel_Chart_Title $xAxisLabel = NULL, PHPExcel_Chart_Title $xAxisLabel = NULL,
PHPExcel_Chart_Title $yAxisLabel = NULL, PHPExcel_Chart_Title $yAxisLabel = NULL,
@ -318,6 +341,12 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement(); $objWriter->endElement();
} }
/**
* Write Data Labels
*
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception
*/
private function _writeDataLbls($objWriter) private function _writeDataLbls($objWriter)
{ {
$objWriter->startElement('c:dLbls'); $objWriter->startElement('c:dLbls');
@ -353,6 +382,18 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement(); $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) private function _writeCatAx($objWriter, PHPExcel_Chart_PlotArea $plotArea, $xAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries)
{ {
$objWriter->startElement('c:catAx'); $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) private function _writeValAx($objWriter, PHPExcel_Chart_PlotArea $plotArea, $yAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries)
{ {
$objWriter->startElement('c:valAx'); $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) private static function _getChartType($plotArea)
{ {
$groupCount = $plotArea->getPlotGroupCount(); $groupCount = $plotArea->getPlotGroupCount();
@ -593,6 +653,17 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
return $chartType; 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) private function _writePlotGroup($plotGroup, $groupType, $objWriter, &$catIsMultiLevelSeries, &$valIsMultiLevelSeries, &$plotGroupingType)
{ {
if (is_null($plotGroup)) { 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) private function _writePlotSeriesLabel($plotSeriesLabel, $objWriter)
{ {
if (is_null($plotSeriesLabel)) { 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') private function _writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, $dataType='str')
{ {
if (is_null($plotSeriesValues)) { 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) private function _writeBubbles($plotSeriesValues, $objWriter)
{ {
if (is_null($plotSeriesValues)) { if (is_null($plotSeriesValues)) {
@ -912,6 +1006,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement(); $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) private function _writeLayout(PHPExcel_Chart_Layout $layout = NULL, $objWriter)
{ {
$objWriter->startElement('c:layout'); $objWriter->startElement('c:layout');
@ -974,6 +1075,12 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement(); $objWriter->endElement();
} }
/**
* Write Alternate Content block
*
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception
*/
private function _writeAlternateContent($objWriter) private function _writeAlternateContent($objWriter)
{ {
$objWriter->startElement('mc:AlternateContent'); $objWriter->startElement('mc:AlternateContent');
@ -997,6 +1104,12 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement(); $objWriter->endElement();
} }
/**
* Write Printer Settings
*
* @param PHPExcel_Shared_XMLWriter $objWriter XML Writer
* @throws Exception
*/
private function _writePrintSettings($objWriter) private function _writePrintSettings($objWriter)
{ {
$objWriter->startElement('c:printSettings'); $objWriter->startElement('c:printSettings');

View File

@ -38,7 +38,8 @@ class PHPExcel_Writer_Excel2007_ContentTypes extends PHPExcel_Writer_Excel2007_W
/** /**
* Write content types to XML format * 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 * @return string XML Output
* @throws Exception * @throws Exception
*/ */

View File

@ -38,8 +38,10 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
/** /**
* Write drawings to XML format * Write drawings to XML format
* *
* @param PHPExcel_Worksheet $pWorksheet * @param PHPExcel_Worksheet $pWorksheet
* @return string XML Output * @param int &$chartRef Chart ID
* @param boolean $includeCharts Flag indicating if we should include drawing details for charts
* @return string XML Output
* @throws Exception * @throws Exception
*/ */
public function writeDrawings(PHPExcel_Worksheet $pWorksheet = null, &$chartRef, $includeCharts = FALSE) public function writeDrawings(PHPExcel_Worksheet $pWorksheet = null, &$chartRef, $includeCharts = FALSE)