ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Function.php
Go to the documentation of this file.
1<?php
37 /* Function categories */
38 const CATEGORY_CUBE = 'Cube';
39 const CATEGORY_DATABASE = 'Database';
40 const CATEGORY_DATE_AND_TIME = 'Date and Time';
41 const CATEGORY_ENGINEERING = 'Engineering';
42 const CATEGORY_FINANCIAL = 'Financial';
43 const CATEGORY_INFORMATION = 'Information';
44 const CATEGORY_LOGICAL = 'Logical';
45 const CATEGORY_LOOKUP_AND_REFERENCE = 'Lookup and Reference';
46 const CATEGORY_MATH_AND_TRIG = 'Math and Trig';
47 const CATEGORY_STATISTICAL = 'Statistical';
48 const CATEGORY_TEXT_AND_DATA = 'Text and Data';
49
55 private $_category;
56
62 private $_excelName;
63
70
79 public function __construct($pCategory = NULL, $pExcelName = NULL, $pPHPExcelName = NULL)
80 {
81 if (($pCategory !== NULL) && ($pExcelName !== NULL) && ($pPHPExcelName !== NULL)) {
82 // Initialise values
83 $this->_category = $pCategory;
84 $this->_excelName = $pExcelName;
85 $this->_phpExcelName = $pPHPExcelName;
86 } else {
87 throw new PHPExcel_Calculation_Exception("Invalid parameters passed.");
88 }
89 }
90
96 public function getCategory() {
97 return $this->_category;
98 }
99
106 public function setCategory($value = null) {
107 if (!is_null($value)) {
108 $this->_category = $value;
109 } else {
110 throw new PHPExcel_Calculation_Exception("Invalid parameter passed.");
111 }
112 }
113
119 public function getExcelName() {
120 return $this->_excelName;
121 }
122
128 public function setExcelName($value) {
129 $this->_excelName = $value;
130 }
131
137 public function getPHPExcelName() {
139 }
140
146 public function setPHPExcelName($value) {
147 $this->_phpExcelName = $value;
148 }
149}
An exception for terminatinating execution or to throw for unit testing.
getPHPExcelName()
Get PHPExcel name.
Definition: Function.php:137
setCategory($value=null)
Set Category (represented by CATEGORY_*)
Definition: Function.php:106
getCategory()
Get Category (represented by CATEGORY_*)
Definition: Function.php:96
getExcelName()
Get Excel name.
Definition: Function.php:119
__construct($pCategory=NULL, $pExcelName=NULL, $pPHPExcelName=NULL)
Create a new PHPExcel_Calculation_Function.
Definition: Function.php:79
setPHPExcelName($value)
Set PHPExcel name.
Definition: Function.php:146
setExcelName($value)
Set Excel name.
Definition: Function.php:128