├── .gitignore ├── AdminModule.php ├── BaseModule.php ├── LICENSE ├── README.md ├── block └── TestMenu.php ├── component ├── RedisQueue.php └── redisqueue │ ├── Job.php │ ├── Queue.php │ ├── QueueController.php │ └── TestJob.php ├── composer.json ├── controllers ├── FecController.php └── ModulesapiController.php ├── helpers ├── CApi.php ├── CCache.php ├── CCaptcha.php ├── CCaptchaAction.php ├── CConfig.php ├── CCookie.php ├── CDB.php ├── CDate.php ├── CDir.php ├── CDoc.php ├── CEmail.php ├── CExcel.php ├── CFile.php ├── CFunc.php ├── CImage.php ├── CLog.php ├── CMessage.php ├── CModel.php ├── CModule.php ├── CProfile.php ├── CRedisQuery.php ├── CRequest.php ├── CSession.php ├── CTranslate.php ├── CUrl.php ├── CUser.php └── CView.php ├── lib └── PHPExcel │ ├── PHPExcel.php │ ├── PHPExcel.zip │ └── PHPExcel │ ├── Autoloader.php │ ├── CachedObjectStorage │ ├── APC.php │ ├── CacheBase.php │ ├── DiscISAM.php │ ├── ICache.php │ ├── Igbinary.php │ ├── Memcache.php │ ├── Memory.php │ ├── MemoryGZip.php │ ├── MemorySerialized.php │ ├── PHPTemp.php │ ├── SQLite.php │ ├── SQLite3.php │ └── Wincache.php │ ├── CachedObjectStorageFactory.php │ ├── CalcEngine │ ├── CyclicReferenceStack.php │ └── Logger.php │ ├── Calculation.php │ ├── Calculation │ ├── Database.php │ ├── DateTime.php │ ├── Engineering.php │ ├── Exception.php │ ├── ExceptionHandler.php │ ├── Financial.php │ ├── FormulaParser.php │ ├── FormulaToken.php │ ├── Function.php │ ├── Functions.php │ ├── Logical.php │ ├── LookupRef.php │ ├── MathTrig.php │ ├── Statistical.php │ ├── TextData.php │ ├── Token │ │ └── Stack.php │ └── functionlist.txt │ ├── Cell.php │ ├── Cell │ ├── AdvancedValueBinder.php │ ├── DataType.php │ ├── DataValidation.php │ ├── DefaultValueBinder.php │ ├── Hyperlink.php │ └── IValueBinder.php │ ├── Chart.php │ ├── Chart │ ├── DataSeries.php │ ├── DataSeriesValues.php │ ├── Exception.php │ ├── Layout.php │ ├── Legend.php │ ├── PlotArea.php │ ├── Renderer │ │ ├── PHP Charting Libraries.txt │ │ └── jpgraph.php │ └── Title.php │ ├── Comment.php │ ├── DocumentProperties.php │ ├── DocumentSecurity.php │ ├── Exception.php │ ├── HashTable.php │ ├── IComparable.php │ ├── IOFactory.php │ ├── NamedRange.php │ ├── Reader │ ├── Abstract.php │ ├── CSV.php │ ├── DefaultReadFilter.php │ ├── Excel2003XML.php │ ├── Excel2007.php │ ├── Excel2007 │ │ ├── Chart.php │ │ └── Theme.php │ ├── Excel5.php │ ├── Excel5 │ │ ├── Escher.php │ │ ├── MD5.php │ │ └── RC4.php │ ├── Exception.php │ ├── Gnumeric.php │ ├── HTML.php │ ├── IReadFilter.php │ ├── IReader.php │ ├── OOCalc.php │ └── SYLK.php │ ├── ReferenceHelper.php │ ├── RichText.php │ ├── RichText │ ├── ITextElement.php │ ├── Run.php │ └── TextElement.php │ ├── Settings.php │ ├── Shared │ ├── CodePage.php │ ├── Date.php │ ├── Drawing.php │ ├── Escher.php │ ├── Escher │ │ ├── DgContainer.php │ │ ├── DgContainer │ │ │ ├── SpgrContainer.php │ │ │ └── SpgrContainer │ │ │ │ └── SpContainer.php │ │ ├── DggContainer.php │ │ └── DggContainer │ │ │ ├── BstoreContainer.php │ │ │ └── BstoreContainer │ │ │ ├── BSE.php │ │ │ └── BSE │ │ │ └── Blip.php │ ├── Excel5.php │ ├── File.php │ ├── Font.php │ ├── JAMA │ │ ├── CHANGELOG.TXT │ │ ├── CholeskyDecomposition.php │ │ ├── EigenvalueDecomposition.php │ │ ├── LUDecomposition.php │ │ ├── Matrix.php │ │ ├── QRDecomposition.php │ │ ├── SingularValueDecomposition.php │ │ └── utils │ │ │ ├── Error.php │ │ │ └── Maths.php │ ├── OLE.php │ ├── OLE │ │ ├── ChainedBlockStream.php │ │ ├── PPS.php │ │ └── PPS │ │ │ ├── File.php │ │ │ └── Root.php │ ├── OLERead.php │ ├── PCLZip │ │ ├── gnu-lgpl.txt │ │ ├── pclzip.lib.php │ │ └── readme.txt │ ├── PasswordHasher.php │ ├── String.php │ ├── TimeZone.php │ ├── XMLWriter.php │ ├── ZipArchive.php │ ├── ZipStreamWrapper.php │ └── trend │ │ ├── bestFitClass.php │ │ ├── exponentialBestFitClass.php │ │ ├── linearBestFitClass.php │ │ ├── logarithmicBestFitClass.php │ │ ├── polynomialBestFitClass.php │ │ ├── powerBestFitClass.php │ │ └── trendClass.php │ ├── Style.php │ ├── Style │ ├── Alignment.php │ ├── Border.php │ ├── Borders.php │ ├── Color.php │ ├── Conditional.php │ ├── Fill.php │ ├── Font.php │ ├── NumberFormat.php │ ├── Protection.php │ └── Supervisor.php │ ├── Worksheet.php │ ├── Worksheet │ ├── AutoFilter.php │ ├── AutoFilter │ │ ├── Column.php │ │ └── Column │ │ │ └── Rule.php │ ├── BaseDrawing.php │ ├── CellIterator.php │ ├── ColumnDimension.php │ ├── Drawing.php │ ├── Drawing │ │ └── Shadow.php │ ├── HeaderFooter.php │ ├── HeaderFooterDrawing.php │ ├── MemoryDrawing.php │ ├── PageMargins.php │ ├── PageSetup.php │ ├── Protection.php │ ├── Row.php │ ├── RowDimension.php │ ├── RowIterator.php │ └── SheetView.php │ ├── WorksheetIterator.php │ ├── Writer │ ├── Abstract.php │ ├── CSV.php │ ├── Excel2007.php │ ├── Excel2007 │ │ ├── Chart.php │ │ ├── Comments.php │ │ ├── ContentTypes.php │ │ ├── DocProps.php │ │ ├── Drawing.php │ │ ├── Rels.php │ │ ├── RelsRibbon.php │ │ ├── RelsVBA.php │ │ ├── StringTable.php │ │ ├── Style.php │ │ ├── Theme.php │ │ ├── Workbook.php │ │ ├── Worksheet.php │ │ └── WriterPart.php │ ├── Excel5.php │ ├── Excel5 │ │ ├── BIFFwriter.php │ │ ├── Escher.php │ │ ├── Font.php │ │ ├── Parser.php │ │ ├── Workbook.php │ │ ├── Worksheet.php │ │ └── Xf.php │ ├── Exception.php │ ├── HTML.php │ ├── IWriter.php │ ├── PDF.php │ └── PDF │ │ ├── Core.php │ │ ├── DomPDF.php │ │ ├── mPDF.php │ │ └── tcPDF.php │ └── locale │ ├── bg │ └── config │ ├── cs │ ├── config │ └── functions │ ├── da │ ├── config │ └── functions │ ├── de │ ├── config │ └── functions │ ├── en │ └── uk │ │ └── config │ ├── es │ ├── config │ └── functions │ ├── fi │ ├── config │ └── functions │ ├── fr │ ├── config │ └── functions │ ├── hu │ ├── config │ └── functions │ ├── it │ ├── config │ └── functions │ ├── nl │ ├── config │ └── functions │ ├── no │ ├── config │ └── functions │ ├── pl │ ├── config │ └── functions │ ├── pt │ ├── br │ │ ├── config │ │ └── functions │ ├── config │ └── functions │ ├── ru │ ├── config │ └── functions │ ├── sv │ ├── config │ └── functions │ └── tr │ ├── config │ └── functions ├── migrations ├── m160108_095739_create_news_table.php ├── m160108_101725_create_andinsert.php ├── m160108_101859_create_andinsert.php ├── m160511_074937_fec.php └── sql │ ├── m160108_095739_create_news_table.sql │ └── m160108_101725_create_andinsert.sql └── views └── testmenu └── index.php /.gitignore: -------------------------------------------------------------------------------- 1 | assets/* 2 | !assets/.gitignore 3 | protected/runtime/* 4 | !protected/runtime/.gitignore 5 | protected/data/*.db 6 | themes/classic/views/ 7 | -------------------------------------------------------------------------------- /AdminModule.php: -------------------------------------------------------------------------------- 1 | 14 | * @since 1.0 15 | */ 16 | class AdminModule extends \yii\base\Module 17 | { 18 | 19 | public $controllerNamespace ; 20 | public $_currentDir ; 21 | public $_currentNameSpace ; 22 | 23 | public function init() 24 | { 25 | parent::init(); 26 | isset($this->_currentDir) && $this->configModuleParams(); 27 | # 默认layout文件 28 | $this->layout = $this->layout ? $this->layout : "main.php"; 29 | 30 | } 31 | 32 | public function configModuleParams(){ 33 | # 配置config文件 34 | $config_file_dir = $this->_currentDir . '/etc/config.php'; 35 | if($this->_currentDir && file_exists($config_file_dir)){ 36 | $params_data = (require($config_file_dir)); 37 | } 38 | 39 | # 设置参数 40 | $params_data['_currentDir'] = $this->_currentDir; 41 | $params_data['_currentNameSpace'] = $this->_currentNameSpace; 42 | $params = $this->params; 43 | if(is_array($params) && !empty($params)){ 44 | $params_data = \yii\helpers\ArrayHelper::merge($params,$params_data); 45 | } 46 | Yii::configure($this, ['params'=> $params_data]); 47 | 48 | } 49 | 50 | /* 51 | public function init() 52 | { 53 | parent::init(); 54 | 55 | $theme = CConfig::getCurrentTheme(); 56 | # 定义views文件所在路径 57 | $dir = \basename($this->_currentDir); 58 | basename(dirname($_SERVER['PHP_SELF'])); 59 | $viewPath = __DIR__ . "/Theme/".$theme."/".strtolower($dir); 60 | $this->setViewPath($viewPath); 61 | # 定义模块专属的layout 文件 appadmin/code/Blog/Theme/default/article/layouts/main.php 62 | //$this->layout = "main.php"; 63 | # 加载配置文件 64 | $config_file_dir = $this->_currentDir . '/etc/config.php'; 65 | if(file_exists($config_file_dir)){ 66 | if(($params_data = (require($config_file_dir))) && !empty($params_data)){ 67 | Yii::configure($this, ['params'=> $params_data]); 68 | } 69 | } 70 | 71 | $this->params['blockDir'] = str_replace("\\controllers","",$this->controllerNamespace); 72 | } 73 | */ 74 | } 75 | -------------------------------------------------------------------------------- /BaseModule.php: -------------------------------------------------------------------------------- 1 | 14 | * @since 1.0 15 | */ 16 | class BaseModule extends \yii\base\Module 17 | { 18 | 19 | public $controllerNamespace ; 20 | public $_currentDir ; 21 | public $_currentNameSpace ; 22 | 23 | 24 | 25 | 26 | public function init() 27 | { 28 | parent::init(); 29 | 30 | $theme = CConfig::getCurrentTheme(); 31 | # 定义views文件所在路径 32 | $dir = \basename($this->_currentDir); 33 | basename(dirname($_SERVER['PHP_SELF'])); 34 | $viewPath = __DIR__ . "/Theme/".$theme."/".strtolower($dir); 35 | $this->setViewPath($viewPath); 36 | # 定义模块专属的layout 文件 appadmin/code/Blog/Theme/default/article/layouts/main.php 37 | //$this->layout = "main.php"; 38 | # 加载配置文件 39 | $config_file_dir = $this->_currentDir . '/etc/config.php'; 40 | if(file_exists($config_file_dir)){ 41 | if(($params_data = (require($config_file_dir))) && !empty($params_data)){ 42 | Yii::configure($this, ['params'=> $params_data]); 43 | } 44 | } 45 | 46 | $this->params['blockDir'] = str_replace("\\controllers","",$this->controllerNamespace); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 fancyecommerce 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Yii2 Fancy Ecommerce (FEC) 2 | ========= 3 | 4 | 5 | github: https://github.com/fancyecommerce/yii2-fec 6 | 7 | [![Latest Stable Version](https://poser.pugx.org/fancyecommerce/fec/v/stable)](https://packagist.org/packages/fancyecommerce/fec) [![Total Downloads](https://poser.pugx.org/fancyecommerce/fec/downloads)](https://packagist.org/packages/fancyecommerce/fec) [![Latest Unstable Version](https://poser.pugx.org/fancyecommerce/fec/v/unstable)](https://packagist.org/packages/fancyecommerce/fec) [![License](https://poser.pugx.org/fancyecommerce/fec/license)](https://packagist.org/packages/fancyecommerce/fec) 8 | 9 | 10 | > 更加详细的说明地址:http://www.fancyecommerce.com/category/yii2-%E6%8F%92%E4%BB%B6%E6%89%A9%E5%B1%95/ 11 | 12 | > QQ: 2358269014 13 | 14 | > 有任何疑问可以发邮件到 2358269014@qq.com 15 | 16 | 1、安装 17 | ------------ 18 | 19 | 安装这个扩展的首选方式是通过 [composer](http://getcomposer.org/download/). 20 | 21 | 执行 22 | 23 | ``` 24 | composer require --prefer-dist fancyecommerce/fec 25 | ``` 26 | 或添加 27 | 28 | ``` 29 | "fancyecommerce/fec": "~1.0.0" 30 | composer install 31 | ``` 32 | 33 | 2、使用 34 | ------------ 35 | 36 | 2.1 fec\helpers\xxxx , 里面是一些常用的帮助类。 37 | 详细可以打开fec\helpers文件夹查看。 38 | 39 | 2.2 Redis Queue 队列的使用 40 | 在使用之前,您需要先进行配置如下: 41 | ```php 42 | 'components' => [ 43 | 'queue' => [ 44 | 'class' => 'fec\component\RedisQueue', 45 | ], 46 | ], 47 | 48 | 'controllerMap' => [ 49 | 'queue' => 'fec\component\redisqueue\QueueController' 50 | ], 51 | ``` 52 | 53 | 详细的使用方法参看\fec\helper\CRedisQueue 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /block/TestMenu.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class TestMenu 16 | { 17 | public $terry1; 18 | public $terry2; 19 | 20 | public function getLastData() 21 | { 22 | $arr = [ 23 | 'terry1' =>$this->terry1, 24 | 'terry2' =>$this->terry2, 25 | ]; 26 | return $arr; 27 | } 28 | } -------------------------------------------------------------------------------- /component/RedisQueue.php: -------------------------------------------------------------------------------- 1 | 17 | * @since 1.0 18 | */ 19 | class RedisQueue extends Queue 20 | { 21 | 22 | /** 23 | * 'queue' => [ 24 | * 'class' => 'fec\component\RedisQueue', 25 | * ], 26 | * 27 | */ 28 | 29 | /** 30 | * @var string Default redis component name 31 | */ 32 | public $redis = 'redis'; 33 | /** 34 | * Class initialization logic 35 | * 36 | * @throws InvalidConfigException 37 | */ 38 | public function init() 39 | { 40 | parent::init(); 41 | if (is_string($this->redis)) { 42 | $this->redis = Yii::$app->get($this->redis); 43 | } elseif (is_array($this->redis)) { 44 | $this->redis = Yii::createObject($this->redis); 45 | } 46 | if (!$this->redis instanceof Connection) { 47 | throw new InvalidConfigException("Queue::redis must be either a Redis connection instance or the application component ID of a Redis connection."); 48 | } 49 | } 50 | protected function pushInternal($payload, $queue = null, $options = []) 51 | { 52 | $this->redis->rpush($this->getQueue($queue), $payload); 53 | $payload = json_decode($payload, true); 54 | return $payload['id']; 55 | } 56 | public function popInternal($queue = null) 57 | { 58 | $payload = $this->redis->lpop($this->getQueue($queue)); 59 | if ($payload) { 60 | //$this->redis->zadd($queue.':reserved', $this->getTime() + 60, $job); 61 | return new Job($this, $payload, $queue); 62 | } 63 | return null; 64 | } 65 | } -------------------------------------------------------------------------------- /component/redisqueue/Job.php: -------------------------------------------------------------------------------- 1 | queueObject = $queueObject; 12 | $this->payload = $payload; 13 | $this->queueName = $queueName; 14 | } 15 | public function run() 16 | { 17 | $this->resolveAndRun(json_decode($this->payload, true)); 18 | } 19 | public function getQueueObject() 20 | { 21 | return $this->queueObject; 22 | } 23 | protected function resolveAndRun(array $payload) 24 | { 25 | list($class, $method) = $this->resolveJob($payload['job']); 26 | $instance = Yii::createObject([ 27 | 'class' => $class 28 | ]); 29 | $instance->{$method}($this, $payload['data']); 30 | } 31 | protected function resolveJob($job) 32 | { 33 | $segments = explode('@', $job); 34 | return count($segments) > 1 ? $segments : array($segments[0], 'run'); 35 | } 36 | } -------------------------------------------------------------------------------- /component/redisqueue/Queue.php: -------------------------------------------------------------------------------- 1 | queuePrefix . ':' . $name; 27 | } 28 | /** 29 | * Push job to the queue 30 | * 31 | * @param string $job Fully qualified class name of the job 32 | * @param mixed $data Data for the job 33 | * @param string|null $queue Queue name 34 | * @return string ID of the job 35 | */ 36 | public function push($job, $data = null, $queue = null, $options = []) 37 | { 38 | return $this->pushInternal($this->createPayload($job, $data), $queue, $options); 39 | } 40 | /** 41 | * Get job from the queue 42 | * 43 | * @param string|null $queue Queue name 44 | * @return mixed 45 | */ 46 | public function pop($queue = null) 47 | { 48 | return $this->popInternal($queue); 49 | } 50 | /** 51 | * Create job array 52 | * 53 | * @param string $job Fully qualified class name of the job 54 | * @param mixed $data Data for the job 55 | * @return array 56 | */ 57 | protected function createPayload($job, $data) 58 | { 59 | $payload = [ 60 | 'job' => $job, 61 | 'data' => $data 62 | ]; 63 | $payload = $this->setMeta($payload, 'id', $this->getRandomId()); 64 | return $payload; 65 | } 66 | /** 67 | * Set additional meta on a payload string. 68 | * 69 | * @param string $payload 70 | * @param string $key 71 | * @param string $value 72 | * @return string 73 | */ 74 | protected function setMeta($payload, $key, $value) 75 | { 76 | $payload[$key] = $value; 77 | return json_encode($payload); 78 | } 79 | /** 80 | * Get random ID. 81 | * 82 | * @return string 83 | */ 84 | protected function getRandomId() 85 | { 86 | return Yii::$app->security->generateRandomString(); 87 | } 88 | /** 89 | * Get prefixed queue name 90 | * 91 | * @param $queue Queue name 92 | * @return string 93 | */ 94 | protected function getQueue($queue) 95 | { 96 | return $this->buildPrefix($queue); 97 | } 98 | /** 99 | * Class-specific realisation of adding the job to the queue 100 | * 101 | * @param array $payload Job data 102 | * @param string|null $queue Queue name 103 | * @param array $options 104 | * 105 | * @return mixed 106 | */ 107 | abstract protected function pushInternal($payload, $queue = null, $options = []); 108 | /** 109 | * Class-specific realisation of getting the job to the queue 110 | * 111 | * @param string|null $queue Queue name 112 | * 113 | * @return mixed 114 | */ 115 | abstract protected function popInternal($queue = null); 116 | } -------------------------------------------------------------------------------- /component/redisqueue/QueueController.php: -------------------------------------------------------------------------------- 1 | process($queueName, $queueObjectName); 25 | } 26 | /** 27 | * Continuously process jobs 28 | * 29 | * @param string $queueName 30 | * @param string $queueObjectName 31 | * @throws \Exception 32 | */ 33 | public function actionListen($queueName = null, $queueObjectName = 'queue') 34 | { 35 | while (true) { 36 | if ($this->timeout !==null) { 37 | if ($this->timeoutprocess($queueName, $queueObjectName)) { 42 | sleep($this->sleep); 43 | } 44 | } 45 | } 46 | protected function process($queueName, $queueObjectName) 47 | { 48 | $queue = Yii::$app->{$queueObjectName}; 49 | $job = $queue->pop($queueName); 50 | if ($job) { 51 | try { 52 | $job->run(); 53 | return true; 54 | } catch (\Exception $e) { 55 | if ($queue->debug) { 56 | var_dump($e); 57 | } 58 | Yii::error($e->getMessage(), __METHOD__); 59 | } 60 | } 61 | return false; 62 | } 63 | public function beforeAction($action) 64 | { 65 | if (!parent::beforeAction($action)) { 66 | return false; 67 | } 68 | if (getenv('QUEUE_TIMEOUT')) { 69 | $this->timeout=(int)getenv('QUEUE_TIMEOUT')+time(); 70 | } 71 | if (getenv('QUEUE_SLEEP')) { 72 | $this->sleep=(int)getenv('QUEUE_SLEEP'); 73 | } 74 | return true; 75 | } 76 | } -------------------------------------------------------------------------------- /component/redisqueue/TestJob.php: -------------------------------------------------------------------------------- 1 | =5.4.0", 25 | "yiisoft/yii2": ">=2.0.6", 26 | "imagine/imagine": "0.7.1", 27 | "yiisoft/yii2-redis": "~2.0.0", 28 | "phpoffice/phpexcel": "1.8.*" 29 | }, 30 | "autoload": { 31 | "psr-4": { 32 | "fec\\": "" 33 | } 34 | }, 35 | "config": { 36 | "process-timeout": 1800 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /controllers/FecController.php: -------------------------------------------------------------------------------- 1 | 15 | * @since 1.0 16 | */ 17 | class FecController extends Controller 18 | { 19 | # 20 | public function getBlock($blockname=''){ 21 | $_currentNameSpace = \fec\helpers\CModule::param("_currentNameSpace"); 22 | if(empty($_currentNameSpace)){ 23 | $message = "Modules Param '_currentNameSpace' is not set , you can set like fecadmin\\Module"; 24 | throw new \yii\web\HttpException(406,$message); 25 | } 26 | $modulesDir = "\\".$_currentNameSpace."\\block\\"; 27 | $url_key = \fec\helpers\CUrl::getUrlKey(); 28 | $url_key = trim($url_key,"/"); 29 | $url_key = substr($url_key,strpos($url_key,"/")+1 ); 30 | $url_key_arr = explode("/",$url_key); 31 | if(!isset($url_key_arr[1])) $url_key_arr[1] = 'index'; 32 | if($blockname){ 33 | $url_key_arr[count($url_key_arr)-1] = ucfirst($blockname); 34 | }else{ 35 | $url_key_arr[count($url_key_arr)-1] = ucfirst($url_key_arr[count($url_key_arr)-1]); 36 | } 37 | 38 | $block_space = implode("\\",$url_key_arr); 39 | $blockFile = $modulesDir.$block_space; 40 | //echo $blockFile;exit; 41 | return new $blockFile; 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /controllers/ModulesapiController.php: -------------------------------------------------------------------------------- 1 | 21 | * @since 1.0 22 | */ 23 | class ModulesapiController extends Controller 24 | { 25 | 26 | # 通过 controller action 自动找到 模块 ./o文件夹下面的文件,通过对应关系匹配 27 | public function actions() 28 | { 29 | $return = []; 30 | 31 | $module_token = Yii::$app->request->post('module_token'); 32 | $this_module_token = \fec\helpers\CModule::getToken(); 33 | if($module_token != $this_module_token){ 34 | 35 | $return['ack'] = false; 36 | $return['ack_description'] = "modules token is not right"; 37 | $return['content'] = $module_token.'#'.$this_module_token; 38 | echo json_encode($return); 39 | exit; 40 | } 41 | $r = $this->getControllerAndAction(); 42 | $t_controller = $r['controller']; 43 | $t_action = $r['action']; 44 | $current_remote_function_param_array = Yii::$app->request->post('current_remote_function_param_array'); 45 | $current_remote_function_param_array = unserialize($current_remote_function_param_array); 46 | $param = (!empty($current_remote_function_param_array) && is_array($current_remote_function_param_array) ) ? $current_remote_function_param_array : [] ; 47 | $current_namespace = $this->_name_space; 48 | $module_o_dir = str_replace("\\controllers","\\o",$current_namespace); 49 | 50 | $function_exec = $module_o_dir."\\".$t_controller."::".$t_action; 51 | $data = \call_user_func_array($function_exec, $param); 52 | $data = json_decode($data); 53 | $return['ack'] = true; 54 | $return['ack_description'] = "success"; 55 | $return['content'] = $data; 56 | # 把模块更新的session更新到redis上面,以供其他模块使用 57 | session_commit(); 58 | echo json_encode($return); 59 | exit; 60 | } 61 | # 得到当前的controller 和action 62 | public function getControllerAndAction(){ 63 | $path_info = Yii::$app->request->getPathInfo(); 64 | $path_info = trim($path_info,"/"); 65 | $controller_str = substr($path_info,strpos($path_info,"/")+1); 66 | $str = strrev($controller_str); 67 | $action = strrev(substr($str,0,strpos($str,"/"))); 68 | $controllerstr = strrev(substr($str,strpos($str,"/")+1)); 69 | $controllerstr = explode("/",$controllerstr); 70 | $arr = []; 71 | $count = count($controllerstr); 72 | $i = 0; 73 | foreach($controllerstr as $v){ 74 | $i++; 75 | if($count == $i){ 76 | $arr[] = ucfirst($v); 77 | }else{ 78 | $arr[] = strtolower($v); 79 | } 80 | } 81 | return [ 82 | 'controller' => implode("/",$arr), 83 | 'action' => $action, 84 | ]; 85 | } 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | } 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /helpers/CApi.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CApi{ 16 | 17 | # 1.通过函数访问api,获取数据 18 | # JSON格式 19 | /* 20 | 参数说明: $url 为API访问的url 21 | $type 为请求类型,默认为get 22 | $data 为传递的数组数据 23 | $timeout 设置超时时间 24 | 返回值: 返回API返回的数据 25 | */ 26 | public static function getCurlData($url,$type="get",$data=array(),$timeout = 10){ 27 | //对空格进行转义 28 | $url = str_replace(' ','+',$url); 29 | if($type == "get"){ 30 | if(!empty($data) && is_array($data)){ 31 | 32 | $arr = []; 33 | foreach($data as $k=>$v){ 34 | $arr[] = $k."=".$v; 35 | } 36 | $str = implode("&",$arr); 37 | if(strstr($url,"?")){ 38 | $url .= "&".$str; 39 | }else{ 40 | $url .= "?".$str; 41 | } 42 | } 43 | 44 | } 45 | $data = json_encode($data); 46 | $url = urldecode($url); 47 | //echo $url ;exit; 48 | $ch = curl_init(); 49 | //设置选项,包括URL 50 | curl_setopt($ch, CURLOPT_URL, "$url"); 51 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 52 | curl_setopt($ch, CURLOPT_HEADER, 0); 53 | curl_setopt($ch,CURLOPT_TIMEOUT,$timeout); //定义超时3秒钟 54 | if($type == "post"){ 55 | // POST数据 56 | curl_setopt($ch, CURLOPT_POST, 1); 57 | curl_setopt($ch, 58 | CURLOPT_HTTPHEADER, 59 | [ 60 | 'Accept: application/json', 61 | 'Content-Type: application/json', 62 | 'Content-Length: ' . strlen($data) 63 | ] 64 | ); 65 | 66 | // 把post的变量加上 67 | curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 68 | } 69 | //执行并获取url地址的内容 70 | $output = curl_exec($ch); 71 | //echo $output ; 72 | //释放curl句柄 73 | curl_close($ch); 74 | //var_dump($output);exit; 75 | return $output; 76 | 77 | } 78 | 79 | } -------------------------------------------------------------------------------- /helpers/CCache.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CCache{ 16 | 17 | const ALL_ROLE_KEY_CACHE_HANDLE = 'all_role_key_cache'; # 菜单role cache 18 | # 得到cache 组件。 19 | public static function cacheM(){ 20 | return Yii::$app->cache; 21 | } 22 | 23 | # 1.得到 cache 24 | public static function get($handle){ 25 | $cache = self::cacheM(); 26 | return $cache->get($handle); 27 | } 28 | 29 | # 2.设置 cache 30 | public static function set($handle,$data,$timeout=0){ 31 | 32 | $cache = self::cacheM(); 33 | if($timeout) 34 | return $cache->set($handle,$data,$timeout); 35 | return $cache->set($handle,$data); 36 | 37 | } 38 | 39 | # 3.刷新 Cache 40 | public static function flushAll(){ 41 | $cache = self::cacheM(); 42 | $cache->flush(); 43 | } 44 | 45 | 46 | 47 | } -------------------------------------------------------------------------------- /helpers/CCaptcha.php: -------------------------------------------------------------------------------- 1 | 14 | * @since 1.0 15 | */ 16 | class CCaptcha extends Captcha 17 | { 18 | public $captchaAction = '/fecadmin/captcha/index'; 19 | 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /helpers/CCaptchaAction.php: -------------------------------------------------------------------------------- 1 | 14 | * @since 1.0 15 | */ 16 | class CCaptchaAction extends CaptchaAction 17 | { 18 | public $minLength = 4; 19 | public $maxLength = 4; 20 | /** 21 | * Generates a new verification code. 22 | * @return string the generated verification code 23 | */ 24 | protected function generateVerifyCode() 25 | { 26 | if ($this->minLength > $this->maxLength) { 27 | $this->maxLength = $this->minLength; 28 | } 29 | if ($this->minLength < 3) { 30 | $this->minLength = 3; 31 | } 32 | if ($this->maxLength > 20) { 33 | $this->maxLength = 20; 34 | } 35 | $length = mt_rand($this->minLength, $this->maxLength); 36 | 37 | $letters = [0,1,2,3,4,5,6,7,8,9]; 38 | return array_rand($letters).array_rand($letters).array_rand($letters).array_rand($letters); 39 | //$vowels = '01234'; 40 | //$code = ''; 41 | // for ($i = 0; $i < $length; ++$i) { 42 | //if ($i % 2 && mt_rand(0, 10) > 2 || !($i % 2) && mt_rand(0, 10) > 9) { 43 | // $code .= $vowels[mt_rand(0, 4)]; 44 | //} else { 45 | // $code .= $letters[mt_rand(0, 20)]; 46 | // } 47 | // } 48 | 49 | //return $code; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /helpers/CConfig.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CConfig 16 | { 17 | public static function param($param){ 18 | if(isset(Yii::$app->params[$param])){ 19 | return Yii::$app->params[$param]; 20 | } 21 | return ; 22 | } 23 | # 1.得到当前的配置模板 24 | public static function getCurrentTheme(){ 25 | return self::param("theme") ? self::param("theme") : 'default'; 26 | } 27 | 28 | # 2.得到默认的module 的 token 配置 29 | # CConfig::getDefaultModuleToken(); 30 | public static function getDefaultModuleToken(){ 31 | return self::param("default_module_token") ? self::param("default_module_token") : ''; 32 | } 33 | } -------------------------------------------------------------------------------- /helpers/CCookie.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CCookie 16 | { 17 | public static function getCookieM(){ 18 | return Yii::$app->request->cookies; 19 | } 20 | 21 | # 1.是否存在某个cookie 22 | public static function hasCookie($key){ 23 | return self::getCookieM()->has($key); 24 | } 25 | 26 | # 2.得到某个cookie的值 27 | public static function getCookie($key,$default=''){ 28 | return self::getCookieM()->getValue($key,$default); 29 | } 30 | 31 | # 3.设置cookie 32 | public static function setCookie($key,$val){ 33 | self::getCookieM()->add(new \yii\web\Cookie([ 34 | 'name' => $key, 35 | 'value' => $val, 36 | ])); 37 | } 38 | 39 | # 4.删除cookie 40 | public static function removeCookie($key){ 41 | return self::getCookieM()->remove($key); 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /helpers/CDate.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CDate 16 | { 17 | 18 | 19 | # 1.得到时间 20 | public static function getCurrentDateTime(){ 21 | return date('Y-m-d H:i:s'); 22 | } 23 | # 2.得到时间 24 | public static function getCurrentDate(){ 25 | return date('Y-m-d'); 26 | } 27 | 28 | # 3.判断时间大小 29 | # 1大于2则返回1,相等返回0,小于返回-1 30 | public static function ifIsBigDate($date1,$date2){ 31 | 32 | if(strtotime($date1) > strtotime($date2)){ 33 | return 1; 34 | }else if(strtotime($date1) == strtotime($date2)){ 35 | return 0; 36 | }else{ 37 | return -1; 38 | } 39 | } 40 | 41 | 42 | public static function getWeekOneDate($date){ 43 | $week = date('w',strtotime($date)); 44 | //echo $date; 45 | //echo $week; 46 | 47 | $c = $week - 1; 48 | return date("Y-m-d",strtotime($date." -$c days " )); 49 | 50 | } 51 | 52 | # 4.通过date,得到年-周。 53 | public static function getYearAndWeek($date){ 54 | //$date = strtotime($date); 55 | $month = date('m',strtotime($date)); 56 | $week = date('W',strtotime($date)); 57 | $year = date('Y',strtotime($date)); 58 | $intMonth = (int)$month; 59 | $intWeek = (int)$week; 60 | if(($intMonth == 1) && $intWeek > 10){ 61 | $week = "00"; 62 | } 63 | return $year."-".$week; 64 | } 65 | 66 | # 得到间隔天数 67 | public static function diffBetweenTwoDays($day1, $day2) 68 | { 69 | $second1 = strtotime($day1); 70 | $second2 = strtotime($day2); 71 | 72 | return abs($second1 - $second2) / 86400; 73 | } 74 | 75 | } -------------------------------------------------------------------------------- /helpers/CDir.php: -------------------------------------------------------------------------------- 1 | 14 | * @since 1.0 15 | */ 16 | class CDir 17 | { 18 | # 1.得到web路径在linux下面的地址 19 | public static function getBaseDir(){ 20 | return Yii::getAlias('@webroot'); 21 | } 22 | # 2.得到 @webroot/media 23 | public static function getMediaDir(){ 24 | return self::getBaseDir()."/media"; 25 | } 26 | 27 | /** 28 | * @property $baseDir | String, create folder in this dir. 29 | * @property $createdDir| String, create folder 30 | * Example: $baseDir = '/www/web/fecshop/web',$createdDir='a/b/c'; 31 | * this function return /www/web/fecshop/web/a/b/c 32 | */ 33 | public static function createFloder($baseDir,$createdDir){ 34 | if(!is_dir($baseDir)){ 35 | throw new InvalidValueException('base dir is not a correct dir'); 36 | } 37 | if(!$createdDir){ 38 | throw new InvalidValueException('created dir can not empty'); 39 | } 40 | if(!is_array($createdDir)){ 41 | $createdDir = trim($createdDir,'/'); 42 | $dir_arr = explode('/',$createdDir); 43 | }else{ 44 | $dir_arr = $createdDir; 45 | } 46 | $dir = $baseDir; 47 | foreach($dir_arr as $folder){ 48 | $dir = $dir.'/'.$folder; 49 | if(!is_dir($dir)){ 50 | @mkdir($dir,0777); 51 | } 52 | } 53 | if(is_dir($dir)){ 54 | return $dir; 55 | }else{ 56 | return false; 57 | } 58 | 59 | } 60 | 61 | 62 | 63 | } -------------------------------------------------------------------------------- /helpers/CDoc.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CDoc 16 | { 17 | 18 | # 3.通过数组生成html文档样式 19 | /* 20 | $array = [ 21 | 'title' => '1111', 22 | 'description' => 'xxxxxxxxxxxx', 23 | 'content' => [ 24 | ['aaa','bbbb'], 25 | ['aaaaa','bbbbbbbbb'], 26 | ], 27 | ]; 28 | 29 | */ 30 | public static function tableformat($array){ 31 | 32 | 33 | 34 | $t_str = ''; 35 | $content = $array['content']; 36 | $i = 0; 37 | 38 | 39 | if(is_array($content) && !empty($content)){ 40 | foreach($content as $d){ 41 | $i++; 42 | if($i == 1){ 43 | $t_str .=''; 44 | if(is_array($d) && !empty($d)){ 45 | foreach($d as $v){ 46 | $t_str .=''.$v.''; 47 | } 48 | } 49 | $t_str .=''; 50 | }else{ 51 | if($i == 2) 52 | $t_str .=''; 53 | 54 | $t_str .=''; 55 | if(is_array($d) && !empty($d)){ 56 | foreach($d as $v){ 57 | $t_str .=''.$v.''; 58 | } 59 | } 60 | $t_str .=''; 61 | 62 | } 63 | 64 | } 65 | $t_str .=''; 66 | } 67 | $str = ' 68 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 91 | 92 | 93 |
'.$array['title'].'
84 | '.$array['description'].' 85 |
86 | 87 | 88 | '.$t_str.' 89 |
90 |
94 |
'; 95 | 96 | return $str; 97 | 98 | } 99 | 100 | } -------------------------------------------------------------------------------- /helpers/CEmail.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CEmail 16 | { 17 | public static function getMailer(){ 18 | return Yii::$app->mailer; 19 | } 20 | 21 | 22 | public static function getMailOb($from,$to,$title,$content,$is_html=1){ 23 | if(!$from || !$to || !$title || !$content){ 24 | return false; 25 | } 26 | # 验证邮箱格式是否正确 27 | if(!self::email_validation($from)){ 28 | return false; 29 | } 30 | # 验证邮箱格式是否正确 31 | if(!self::email_validation($to)){ 32 | return false; 33 | } 34 | $m = self::getMailer()->compose() 35 | ->setFrom($from) 36 | ->setTo($to) 37 | ->setSubject($title); 38 | if($is_html){ 39 | $m->setHtmlBody($content); 40 | }else{ 41 | $m->setTextBody($content); 42 | } 43 | return $m; 44 | 45 | } 46 | 47 | # 1.发送一封邮件 48 | # $from $to $title $content 不能为空。 49 | public static function sendMail($from,$to,$title,$content,$is_html=1){ 50 | $m = self::getMailOb($from,$to,$title,$content,$is_html); 51 | if($m){ 52 | $m->send(); 53 | return true; 54 | } 55 | 56 | return false; 57 | } 58 | 59 | # 2.批量发送邮件 60 | /* 61 | 参数:数组格式如下: 62 | $arr = [ 63 | [ 64 | 'from' =>'zqy234@126.com', 65 | 'to' =>'3727@gmail.com', 66 | 'title' =>'my111', 67 | 'content' =>'
111
', 68 | 'is_html' => 1, 69 | ], 70 | [ 71 | 'from' =>'zqy234@126.com', 72 | 'to' =>'terry@gmail.com', 73 | 'title' =>'to tototto', 74 | 'content' =>'hello ddd', 75 | 'is_html' => 0, 76 | ], 77 | ]; 78 | forece 代表多送多个邮件,其中一个邮件的格式或者数据为空的情况下,其他符合 79 | 标准的邮件是否发送 80 | force=1,代表其他符合格式的邮件发送 81 | force=0,如果某个邮件内容有问题,全部不发送。 82 | */ 83 | public static function sendMultipleEmail($arr,$forece=1){ 84 | 85 | $messages = []; 86 | foreach ($arr as $one) { 87 | $from = isset($one['from']) ? $one['from'] : ''; 88 | $to = isset($one['to']) ? $one['to'] : ''; 89 | $title = isset($one['title']) ? $one['title'] : ''; 90 | $content = isset($one['content']) ? $one['content'] : ''; 91 | $is_html = isset($one['is_html']) ? $one['is_html'] : 0; 92 | 93 | $m = self::getMailOb($from,$to,$title,$content,$is_html); 94 | if(!$m){ 95 | if(!$forece){ #如果数据格式有问题,force为0,则全部不发送 96 | return false; 97 | } 98 | }else{ 99 | $messages[] = $m; 100 | } 101 | } 102 | if(!empty($messages)){ 103 | $count = count($messages); 104 | self::getMailer()->sendMultiple($messages); 105 | # 返回发送的邮件的个数。 106 | return $count; 107 | } 108 | return false; 109 | } 110 | 111 | 112 | 113 | # 3.验证邮箱格式是否正确 114 | public static function email_validation($mail) 115 | { 116 | if($mail != '') 117 | { 118 | if(preg_match("/^[-A-Za-z0-9_]+[-A-Za-z0-9_.]*[@]{1}[-A-Za-z0-9_]+[-A-Za-z0-9_.]*[.]{1}[A-Za-z]{2,5}$/", $mail)) 119 | { 120 | return true; 121 | } 122 | else 123 | { 124 | return false; 125 | } 126 | } 127 | else 128 | { 129 | return false; 130 | } 131 | } 132 | 133 | } -------------------------------------------------------------------------------- /helpers/CExcel.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CExcel 16 | { 17 | # 1.加载phpExcel组件文件 18 | public static function prepare(){ 19 | require_once(__DIR__."/../lib/PHPExcel/PHPExcel.php"); 20 | require_once(__DIR__."/../lib/PHPExcel/PHPExcel/IOFactory.php"); 21 | require_once(__DIR__."/../lib/PHPExcel/PHPExcel/Reader/Excel2007.php"); 22 | 23 | } 24 | 25 | # 2.得到excel文件的内容 26 | public static function getExcelContent($xlsDir){ 27 | self::prepare(); 28 | //echo $xlsDir;exit; 29 | $objPHPExcel = \PHPExcel_IOFactory::load($xlsDir); 30 | $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); 31 | return $sheetData; 32 | 33 | } 34 | 35 | 36 | # 3.array中的数据,以excel的方式下载下来。 37 | # $data 是数据数组 38 | # $fileName 是文件名字 39 | /* 40 | 参数说明 41 | $data = [ 42 | [11,22,33,44], 43 | [131,22,33,44], 44 | ]; 45 | 使用方式:\fec\helpers\CExcel::downloadExcelFileByArray($data); 46 | 调用这个方法后,会下载excel文件。 47 | */ 48 | 49 | 50 | public static function downloadExcelFileByArray($data,$fileName=''){ 51 | self::prepare(); 52 | if(!$fileName){ 53 | $fileName = 'xls-download-'.date('Y-m-d-H-i-s').'.xls'; 54 | } 55 | $objPHPExcel = new \PHPExcel(); 56 | $objPHPExcel->getActiveSheet()->fromArray($data); 57 | $objPHPExcel->getActiveSheet()->freezePane('A2'); 58 | // Redirect output to a client’s web browser (Excel5) 59 | header('Content-Type: application/vnd.ms-excel'); 60 | header('Content-Disposition: attachment;filename="'.$fileName.'"'); 61 | header('Cache-Control: max-age=0'); 62 | // If you're serving to IE 9, then the following may be needed 63 | header('Cache-Control: max-age=1'); 64 | 65 | // If you're serving to IE over SSL, then the following may be needed 66 | header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past 67 | header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified 68 | header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1 69 | header ('Pragma: public'); // HTTP/1.0 70 | 71 | $objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); 72 | $objWriter->save('php://output'); 73 | exit; 74 | 75 | } 76 | 77 | 78 | } 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /helpers/CFile.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CFile 16 | { 17 | 18 | 19 | # 1.保存前台上传的文件。 20 | public static function saveUploadFile($fileFullDir,$fileType = ''){ 21 | if($fileType){ 22 | $name = $_FILES["file"]["name"]; 23 | if(strstr($name,$fileType)){ 24 | $result = @move_uploaded_file($_FILES["file"]["tmp_name"],$fileFullDir); 25 | } 26 | }else{ 27 | 28 | $result = @move_uploaded_file($_FILES["file"]["tmp_name"],$fileFullDir); 29 | } 30 | return $result; 31 | } 32 | 33 | # 2.得到csv文件的内容,返回数组 34 | public static function getCsvFileContent($fileDir){ 35 | $fp = @fopen($fileDir, "r"); 36 | $content = []; 37 | if($fp){ 38 | while(! @feof($fp)) 39 | { 40 | $c = @fgets($fp); 41 | //$c = str_replace("\"","",$c); 42 | //$c = str_replace("'","",$c); 43 | $c_arr = explode(",",$c); 44 | $arr = []; 45 | foreach($c_arr as $v){ 46 | $arr[] = trim($v); 47 | } 48 | $content[] = $arr; 49 | 50 | } 51 | fclose($fp); 52 | } 53 | return $content; 54 | 55 | } 56 | 57 | } -------------------------------------------------------------------------------- /helpers/CFunc.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CFunc 16 | { 17 | # 1.object 转换成 数组。 18 | public static function object_to_array($obj) 19 | { 20 | //$_arr = is_object($obj) ? get_object_vars($obj) : $obj; 21 | if(is_object($obj) || is_array($obj)){ 22 | if(is_object($obj)){ 23 | $_arr = get_object_vars($obj); 24 | }else{ 25 | $_arr = $obj; 26 | } 27 | foreach ($_arr as $key => $val) 28 | { 29 | $val = (is_array($val) || is_object($val)) ? self::object_to_array($val) : $val; 30 | $arr[$key] = $val; 31 | } 32 | return $arr; 33 | }else{ 34 | return $obj; 35 | } 36 | 37 | } 38 | 39 | # 2.是否是时间格式 40 | public static function is_time($time) 41 | { 42 | $time = trim($time); 43 | $pattern1 = '/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/s'; 44 | $r1 = preg_match($pattern1, $time); 45 | 46 | $pattern2 = '/^\d{4}-\d{2}-\d{2}$/s'; 47 | $r2 = preg_match($pattern2, $time); 48 | return ($r1 || $r2 ); 49 | } 50 | 51 | # 3.对二维数组进行排序 52 | /* 譬如数组 53 | $arr = [ 54 | ['name' = 'x1','age'=33], 55 | ['name' = 'y1','age'=11], 56 | ['name' = 'a1','age'=66], 57 | ['name' = 't1','age'=44], 58 | ]; 59 | $result = CFunc::array_sort($arr,'name','asc'); 60 | */ 61 | # 二维数组进行排序 62 | # $array为要排序的数组 63 | # $keys为要用来排序的键名,二维数组的key 64 | # $type默认为升序排序 65 | public static function array_sort($array,$keys,$dir='asc',$isFloat=true){ 66 | 67 | $keysvalue = $new_array = array(); 68 | foreach ($array as $k=>$v){ 69 | if($isFloat){ 70 | $keysvalue[$k] = (float)$v[$keys]; 71 | }else{ 72 | $keysvalue[$k] = $v[$keys]; 73 | } 74 | } 75 | if($dir == 'asc'){ 76 | asort($keysvalue); 77 | }else{ 78 | arsort($keysvalue); 79 | } 80 | reset($keysvalue); 81 | foreach ($keysvalue as $k=>$v){ 82 | $new_array[$k] = $array[$k]; 83 | } 84 | return $new_array; 85 | } 86 | 87 | # 4.得到真实的IP 88 | public static function get_real_ip(){ 89 | $ip=false; 90 | if(!empty($_SERVER["HTTP_CLIENT_IP"])){ 91 | $ip = $_SERVER["HTTP_CLIENT_IP"]; 92 | } 93 | if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { 94 | $ips = explode (", ", $_SERVER['HTTP_X_FORWARDED_FOR']); 95 | if ($ip) { 96 | array_unshift($ips, $ip); $ip = FALSE; 97 | } 98 | for ($i = 0; $i < count($ips); $i++) { 99 | if (!preg_match("/^(10|172\.16|192\.168)\./i", $ips[$i])) { 100 | $ip = $ips[$i]; 101 | break; 102 | } 103 | } 104 | } 105 | 106 | return ($ip ? $ip : $_SERVER['REMOTE_ADDR']); 107 | } 108 | 109 | # 得到4位小数点 110 | public function getFormatFloat($data,$decimal=4){ 111 | return round($data,$decimal); 112 | 113 | } 114 | 115 | } -------------------------------------------------------------------------------- /helpers/CLog.php: -------------------------------------------------------------------------------- 1 | 16 | * @since 1.0 17 | */ 18 | class CLog 19 | { 20 | # 1.数据库Log ,将错误信息输出到表:system_log 21 | # common\config\main.php 22 | public static function dbinfo($info,$categories = 'db_mysql'){ 23 | $info = self::getInfo($info)); 24 | if($info && $categories) 25 | \Yii::info($info,$categories); 26 | } 27 | # 2.文件Log,详细的输出路径参看配置。 28 | # 目前的输出地址为:@app/runtime/logs/file_log.log 29 | public static function fileinfo($info,$categories = 'file_log'){ 30 | $info = self::getInfo($info)); 31 | if($info && $categories) 32 | \Yii::info($info,$categories); 33 | } 34 | # 3.信息的转换,将object,array 转换成字符串,以供输出。 35 | public static function getInfo($info){ 36 | if(!$info) 37 | return false; 38 | if(is_object($info)) 39 | $info = CFunc::object_to_array($info); 40 | if(is_array($info)) 41 | $info = json_encode($info); 42 | return $info; 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /helpers/CMessage.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CMessage 16 | { 17 | # 1.将错误信息写入到flash session。 18 | public static function error($info){ 19 | CSession::getSessionM()->setFlash('error',$info); 20 | } 21 | 22 | # 2.将成功信息写入到flash session。 23 | public static function success($info){ 24 | CSession::getSessionM()->setFlash('success', $info); 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /helpers/CModel.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CModel 16 | { 17 | 18 | 19 | # 1.将models 的错误信息转换成字符串 20 | public static function getErrorStr($errors){ 21 | $str = ''; 22 | if(is_array($errors)){ 23 | foreach($errors as $field=>$error_k){ 24 | $str .= $field.':'.implode(",",$error_k)."
"; 25 | } 26 | } 27 | return $str; 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /helpers/CModule.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CModule //extends CModule 16 | { 17 | # 1.得到模块内部的配置,模块的配置在模块的etc/config.php内 18 | public static function param($param,$moduleName=''){ 19 | if($moduleName){ 20 | //echo $moduleName;exit; 21 | return Yii::$app->getModule($moduleName)->params[$param]; 22 | }else{ 23 | return Yii::$app->controller->module->params[$param]; 24 | 25 | } 26 | } 27 | # \fec\helpers\CModule::getToken(); 28 | # 得到模块的 验证token 29 | public static function getToken(){ 30 | 31 | $module_token = self::param('module_token'); 32 | 33 | if($module_token){ 34 | return $module_token; 35 | }else{ 36 | return CConfig::getDefaultModuleToken(); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /helpers/CRedisQuery.php: -------------------------------------------------------------------------------- 1 | 17 | * @since 1.0 18 | */ 19 | class CRedisQueue extends Queue 20 | { 21 | /* 22 | 在使用之前,您需要先进行配置如下: 23 | 'components' => [ 24 | 'queue' => [ 25 | 'class' => 'fec\component\RedisQueue', 26 | ], 27 | ], 28 | 29 | 'controllerMap' => [ 30 | 'queue' => 'fec\component\redisqueue\QueueController' 31 | ], 32 | 33 | 34 | */ 35 | /* 36 | 1. 定义TestJob文件 37 | 实现run方法() 38 | 2. 执行命令行:./yii queue/listen MyTestQueue 39 | 3. 使用push方法,把参数传入 40 | $job = '\fec\component\redisqueue\TestJob'; 41 | $data = ['a', 'b', 'c']; 42 | $queue = 'MyTestQueue'; 43 | CRedisQuery::push($job,$data); 44 | 45 | \fec\component\redisqueue\TestJob 里面的run方法将会被执行 46 | 47 | */ 48 | public static function push($job,$data,$queue = null){ 49 | //return Yii::$app->queue->push('\fec\component\redisqueue\TestJob', ['a', 'b', 'c']); 50 | return Yii::$app->queue->push($job,$data,$queue); 51 | 52 | } 53 | } -------------------------------------------------------------------------------- /helpers/CRequest.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CRequest 16 | { 17 | public static function getRequest(){ 18 | return Yii::$app->request; 19 | } 20 | # 1.得到post请求类型的数据 21 | public static function post($key = ""){ 22 | 23 | if($key){ 24 | $v = self::getRequest()->post($key); 25 | }else{ 26 | $v = self::getRequest()->post(); 27 | } 28 | return $v; 29 | } 30 | # 2.设置 31 | public static function set($key,$val){ 32 | return self::getRequest()->set($key,$val); 33 | } 34 | # 3.得到get请求类型的数据 35 | public static function get($key = ""){ 36 | if($key){ 37 | $v = self::getRequest()->get($key); 38 | }else{ 39 | $v = self::getRequest()->get(); 40 | } 41 | return $v; 42 | } 43 | # 4.得到get 和 post的所有数据。 44 | # 如果一个值在get和post中都存在,则post优先。 45 | public static function param($key = ''){ 46 | if($key){ 47 | $get = self::get(); 48 | $post = self::post(); 49 | if(isset($post[$key])){ 50 | return $post[$key] ; 51 | }else if(isset($get[$key])){ 52 | return $get[$key] ; 53 | }else{ 54 | return ""; 55 | } 56 | }else{ 57 | $get = self::get(); 58 | $post = self::post(); 59 | return array_merge($get,$post); 60 | } 61 | } 62 | # 5.得到csrfName 63 | public static function getCsrfName(){ 64 | return self::getRequest()->csrfParam; 65 | } 66 | # 6.得到csrf对应的值。 67 | public static function getCsrfValue(){ 68 | return self::getRequest()->getCsrfToken(); 69 | } 70 | # 7.得到csrf的input 的 html 71 | public static function getCsrfInputHtml(){ 72 | return ''; 73 | } 74 | 75 | # 8.得到csrf对应的字符串 76 | public static function getCsrfString(){ 77 | return self::getCsrfName()."=".self::getCsrfValue(); 78 | } 79 | 80 | } 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /helpers/CSession.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CSession 16 | { 17 | 18 | public static function getSessionM(){ 19 | return Yii::$app->session; 20 | } 21 | 22 | # 1. 设置session 23 | public static function set($key,$value){ 24 | return self::getSessionM()->set($key,$value); 25 | } 26 | # 2.得到session 27 | public static function get($key){ 28 | return self::getSessionM()->get($key); 29 | } 30 | # 3.删除session 31 | public static function remove($key){ 32 | return self::getSessionM()->remove($key); 33 | } 34 | } -------------------------------------------------------------------------------- /helpers/CTranslate.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CTranslate 16 | { 17 | 18 | const CURRENT_LANGUAGE = 'current_language'; 19 | public static $current_language; 20 | 21 | 22 | # 翻译 23 | # 使用前需要配置: 24 | /* 25 | 26 | 'i18n' => [ 27 | 'translations' => [ 28 | '*' => [ 29 | 'class' => 'yii\i18n\PhpMessageSource', 30 | 'basePath' =>'@frontend/language', # 翻译语言的路径 31 | 'sourceLanguage' => 'en_US', # 默认语言 32 | 'fileMap' => [ 33 | 'companie' => 'companie.php', # 翻译文件 34 | ], 35 | ], 36 | ], 37 | ], 38 | 39 | */ 40 | # 1.在使用前,需要设置当前的语言 CTranslate::setCurrentLanguage($language); 41 | # 2.当然,也可以不设置语言,在本函数中传递语言参数到这个函数中 42 | # 语言格式为:en_US es_ES de_DE fr_FR 等 43 | # 如果不设置语言,默认为英语语言 44 | # 45 | # 使用例子:Translate::__('my %s is very %s',array('son','big')); 46 | public static function __($text,$arr = array(),$language='',$file=''){ 47 | if(!$file){ 48 | $file = 'companie'; 49 | } 50 | if(!$language){ 51 | $language = self::getCurrentLanguage(); 52 | } 53 | Yii::$app->language = $language; 54 | $gText = Yii::t($file, $text); 55 | if(!empty($arr)){ 56 | foreach($arr as $a){ 57 | $gText = preg_replace('/%s/',$a,$gText,1); 58 | } 59 | } 60 | return $gText; 61 | 62 | } 63 | 64 | # 2.得到当前的language 65 | public static function getCurrentLanguage(){ 66 | if(!self::$current_language){ 67 | $language = CSession::get(self::CURRENT_LANGUAGE); 68 | if(!$language){ 69 | $language = 'en_US'; 70 | } 71 | self::$current_language = $language; 72 | } 73 | return self::$current_language; 74 | } 75 | 76 | # 3.设置当前的language 77 | public static function setCurrentLanguage($language){ 78 | CSession::set(self::CURRENT_LANGUAGE,$language); 79 | } 80 | } 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /helpers/CUrl.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CUrl 16 | { 17 | public static $_baseHttpUrl; 18 | public static $_baseHttpsUrl; 19 | # 1.获取首页地址。 20 | public static function getHomeUrl(){ 21 | return Yii::$app->getHomeUrl(); 22 | //return Yii::$app->getBaseUrl(true); 23 | } 24 | # 2. 获取首页地址。同上 25 | public static function getBaseUrl(){ 26 | if(!self::$_baseHttpsUrl){ 27 | if(\Yii::$app->urlManager->enablePrettyUrl && (!\Yii::$app->urlManager->showScriptName)){ 28 | self::$_baseHttpsUrl = self::getHomeUrl().'/index.php'; 29 | } 30 | self::$_baseHttpsUrl = self::getHomeUrl(); 31 | } 32 | return self::$_baseHttpsUrl; 33 | 34 | } 35 | 36 | # 3.立即跳转 和 yii2的跳转还是不同 37 | public static function redirect($url,$isHttps=false){ 38 | if($url){ 39 | if(substr($url,0,4) != "http"){ 40 | $url = self::getUrl($url,[],$isHttps); 41 | } 42 | header("Location: $url"); 43 | exit; 44 | } 45 | } 46 | 47 | 48 | 49 | #5. 通过url path 和参数 得到当前网站下的完整url路径。 50 | public static function getUrl($url_path,$params=array(),$isHttps=false){ 51 | $url_path = trim($url_path,'/'); 52 | $url = self::getBaseUrl(). '/' .$url_path; 53 | if(!empty($params) && is_array($params)){ 54 | $arr = []; 55 | foreach($params as $k=>$v){ 56 | $arr[] = $k."=".$v; 57 | } 58 | return $url.'?'.implode('&',$arr); 59 | } 60 | return $url; 61 | } 62 | 63 | # 6.得到当前的完整url 64 | public static function getCurrentUrl(){ 65 | //$s = self::getHomeUrl(); 66 | //return $s.$_SERVER["REQUEST_URI"]; 67 | return \yii\helpers\Url::current(); 68 | } 69 | # 7.得到当前的完整url no param 70 | public static function getCurrentUrlNoParam(){ 71 | $url = self::getCurrentUrl(); 72 | if(strstr($url,"#")){ 73 | $url = substr($url,0,strpos($url,"#")); 74 | } 75 | 76 | if(strstr($url,"?")){ 77 | $url = substr($url,0,strpos($url,"?")); 78 | } 79 | return $url; 80 | 81 | } 82 | 83 | # 8、得到url key ,譬如 http://www.x.com/ss/dd/aa?aaaa=ddddd 返回 /ss/dd/aa 84 | public static function getUrlKey(){ 85 | 86 | return Yii::$app->request->getPathInfo(); 87 | } 88 | # 9.得到url ,譬如 http://www.x.com/ss/dd/aa?aaaa=ddddd 返回 /ss/dd/aa?aaaa=ddddd 89 | public static function getUrlKeyWithParam(){ 90 | return Yii::$app->getRequest()->url; 91 | } 92 | 93 | } -------------------------------------------------------------------------------- /helpers/CUser.php: -------------------------------------------------------------------------------- 1 | 13 | * @since 1.0 14 | */ 15 | class CUser 16 | { 17 | # 1.检测用户是否登录 18 | public static function isLogin(){ 19 | if($identity = Yii::$app->user->identity){ 20 | return true; 21 | } 22 | return false; 23 | } 24 | 25 | # 2.得到当前的用户名 26 | public static function getCurrentUsername(){ 27 | if($identity = Yii::$app->user->identity){ 28 | if(isset($identity['username']) && !empty($identity['username'])){ 29 | return $identity['username']; 30 | } 31 | } 32 | return ''; 33 | } 34 | 35 | # 3.得到当前用户的id 36 | public static function getCurrentUserId(){ 37 | if($identity = Yii::$app->user->identity){ 38 | if(isset($identity['id']) && !empty($identity['id'])){ 39 | return $identity['id']; 40 | } 41 | } 42 | return ''; 43 | } 44 | 45 | # 3.判断是否是超级用户,需要配置项:super_admin_user 46 | public static function isSuperUser($user = ''){ 47 | $superUser = self::getSuperUserConfig(); 48 | if(!$user){ 49 | $user = self::getCurrentUsername(); 50 | } 51 | if($user && in_array($user,$superUser)){ 52 | return true; 53 | } 54 | return false; 55 | } 56 | 57 | # 4.得到用户的配置。 58 | public static function getSuperUserConfig(){ 59 | $superUser = ['admin']; 60 | $configSuperUser = CConfig::param('super_admin_user'); 61 | if(is_array($configSuperUser) && !empty($configSuperUser)){ 62 | $superUser = array_merge($superUser,$configSuperUser); 63 | $superUser = array_unique($superUser); 64 | } 65 | return $superUser; 66 | } 67 | 68 | 69 | 70 | 71 | } -------------------------------------------------------------------------------- /helpers/CView.php: -------------------------------------------------------------------------------- 1 | 15 | * @since 1.0 16 | */ 17 | class CView 18 | { 19 | # 功能块: 20 | # 本功能的作用是通过一个类文件,和一个view 文件,生成一个html块,而且在这个html中还可以嵌套其他的块 21 | # 这样设计的好处:譬如在前端,我们在很多url中都会有一些公用的侧栏块,我们很希望我们的块可以通过配置的方式很容易的加入到侧栏 22 | # 譬如电商网站侧栏的:客户的浏览记录,我们在多个页面都想加入这个功能,我们就可以很方便的做加入。 23 | 24 | # 默认的方法,功能块的提供数据的默认方法。可以在配置中配置method方法自定义。 25 | const DATA_METHOD = 'getLastData'; 26 | 27 | /* 你可以在view 文件中通过下面的方式使用 28 | 'fec\block\TestMenu', 34 | 'view' => '@fec/views/testmenu/index.php', 35 | # 下面为选填 36 | 'method'=> 'getLastData', 37 | 'terry1'=> 'My1', 38 | 'terry2'=> 'My2', 39 | ]; 40 | echo CView::getChildHtml($config) 41 | ?> 42 | */ 43 | public static function getChildHtml($config) 44 | { 45 | if( !isset($config['view']) || empty($config['view']) 46 | ){ 47 | throw new InvalidConfigException('view and class must exist in array config!'); 48 | } 49 | if( !isset($config['class']) || empty($config['class'])) 50 | return Yii::$app->view->render($config['view'], []); 51 | $method = self::DATA_METHOD; 52 | if(isset($config['method']) && !empty($config['method'])){ 53 | $method = $config['method']; 54 | unset($config['method']); 55 | } 56 | $view = $config['view']; 57 | unset($config['view']); 58 | $ob = Yii::createObject($config); 59 | $params = $ob->$method(); 60 | return Yii::$app->view->render($view, $params); 61 | 62 | } 63 | # 通过配置 64 | /* 65 | 1.add config param to modules params or application params. 66 | params.php 67 | [ 68 | 'params' => [ 69 | 'block' =>[ 70 | 'menu' =>[ 71 | # 必填 72 | 'class' => 'fec\block\TestMenu', 73 | 'view' => '@fec/views/testmenu/index.php', 74 | # 下面为选填 75 | 'method'=> 'getLastData', 76 | 'terry1'=> 'My1', 77 | 'terry2'=> 'My2', 78 | ], 79 | ] 80 | ] 81 | ] 82 | 2. 83 | use fec\helpers\CView; 84 | CView::getConfigChildHtml('menu'); 85 | */ 86 | public static function getConfigChildHtml($configKey){ 87 | $config = []; 88 | # get config from module param 89 | if($module = Yii::$app->controller->module){ 90 | $module_config = CModule::param("block"); 91 | if(isset($module_config[$configKey])){ 92 | $config = $module_config[$configKey]; 93 | } 94 | } 95 | # if module config param is empty or not exist, 96 | # get config from application 97 | if(empty($config)){ 98 | $app_config = CConfig::param("block"); 99 | if(isset($app_config[$configKey])){ 100 | $config = $app_config[$configKey]; 101 | } 102 | } 103 | 104 | if(!isset($config['view']) || empty($config['view']) 105 | ){ 106 | throw new InvalidConfigException('view and class must exist in array config!'); 107 | }else{ 108 | return self::getChildHtml($config); 109 | } 110 | 111 | } 112 | } -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fecshop/yii2-fec/93ac38e51318dbd949dea66079d1f565c0b4f908/lib/PHPExcel/PHPExcel.zip -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Autoloader.php: -------------------------------------------------------------------------------- 1 | _stack); 53 | } 54 | 55 | /** 56 | * Push a new entry onto the stack 57 | * 58 | * @param mixed $value 59 | */ 60 | public function push($value) { 61 | $this->_stack[] = $value; 62 | } // function push() 63 | 64 | /** 65 | * Pop the last entry from the stack 66 | * 67 | * @return mixed 68 | */ 69 | public function pop() { 70 | return array_pop($this->_stack); 71 | } // function pop() 72 | 73 | /** 74 | * Test to see if a specified entry exists on the stack 75 | * 76 | * @param mixed $value The value to test 77 | */ 78 | public function onStack($value) { 79 | return in_array($value, $this->_stack); 80 | } 81 | 82 | /** 83 | * Clear the stack 84 | */ 85 | public function clear() { 86 | $this->_stack = array(); 87 | } // function push() 88 | 89 | /** 90 | * Return an array of all entries on the stack 91 | * 92 | * @return mixed[] 93 | */ 94 | public function showStack() { 95 | return $this->_stack; 96 | } 97 | 98 | } // class PHPExcel_CalcEngine_CyclicReferenceStack 99 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Calculation/Exception.php: -------------------------------------------------------------------------------- 1 | line = $line; 49 | $e->file = $file; 50 | throw $e; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Calculation/ExceptionHandler.php: -------------------------------------------------------------------------------- 1 | _count; 60 | } // function count() 61 | 62 | /** 63 | * Push a new entry onto the stack 64 | * 65 | * @param mixed $type 66 | * @param mixed $value 67 | * @param mixed $reference 68 | */ 69 | public function push($type, $value, $reference = NULL) { 70 | $this->_stack[$this->_count++] = array('type' => $type, 71 | 'value' => $value, 72 | 'reference' => $reference 73 | ); 74 | if ($type == 'Function') { 75 | $localeFunction = PHPExcel_Calculation::_localeFunc($value); 76 | if ($localeFunction != $value) { 77 | $this->_stack[($this->_count - 1)]['localeValue'] = $localeFunction; 78 | } 79 | } 80 | } // function push() 81 | 82 | /** 83 | * Pop the last entry from the stack 84 | * 85 | * @return mixed 86 | */ 87 | public function pop() { 88 | if ($this->_count > 0) { 89 | return $this->_stack[--$this->_count]; 90 | } 91 | return NULL; 92 | } // function pop() 93 | 94 | /** 95 | * Return an entry from the stack without removing it 96 | * 97 | * @param integer $n number indicating how far back in the stack we want to look 98 | * @return mixed 99 | */ 100 | public function last($n = 1) { 101 | if ($this->_count - $n < 0) { 102 | return NULL; 103 | } 104 | return $this->_stack[$this->_count - $n]; 105 | } // function last() 106 | 107 | /** 108 | * Clear the stack 109 | */ 110 | function clear() { 111 | $this->_stack = array(); 112 | $this->_count = 0; 113 | } 114 | 115 | } // class PHPExcel_Calculation_Token_Stack 116 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Cell/DefaultValueBinder.php: -------------------------------------------------------------------------------- 1 | setValueExplicit( $value, self::dataTypeForValue($value) ); 64 | 65 | // Done! 66 | return TRUE; 67 | } 68 | 69 | /** 70 | * DataType for value 71 | * 72 | * @param mixed $pValue 73 | * @return string 74 | */ 75 | public static function dataTypeForValue($pValue = null) { 76 | // Match the value against a few data types 77 | if (is_null($pValue)) { 78 | return PHPExcel_Cell_DataType::TYPE_NULL; 79 | 80 | } elseif ($pValue === '') { 81 | return PHPExcel_Cell_DataType::TYPE_STRING; 82 | 83 | } elseif ($pValue instanceof PHPExcel_RichText) { 84 | return PHPExcel_Cell_DataType::TYPE_INLINE; 85 | 86 | } elseif ($pValue{0} === '=' && strlen($pValue) > 1) { 87 | return PHPExcel_Cell_DataType::TYPE_FORMULA; 88 | 89 | } elseif (is_bool($pValue)) { 90 | return PHPExcel_Cell_DataType::TYPE_BOOL; 91 | 92 | } elseif (is_float($pValue) || is_int($pValue)) { 93 | return PHPExcel_Cell_DataType::TYPE_NUMERIC; 94 | 95 | } elseif (preg_match('/^\-?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)$/', $pValue)) { 96 | return PHPExcel_Cell_DataType::TYPE_NUMERIC; 97 | 98 | } elseif (is_string($pValue) && array_key_exists($pValue, PHPExcel_Cell_DataType::getErrorCodes())) { 99 | return PHPExcel_Cell_DataType::TYPE_ERROR; 100 | 101 | } else { 102 | return PHPExcel_Cell_DataType::TYPE_STRING; 103 | 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Cell/Hyperlink.php: -------------------------------------------------------------------------------- 1 | _url = $pUrl; 62 | $this->_tooltip = $pTooltip; 63 | } 64 | 65 | /** 66 | * Get URL 67 | * 68 | * @return string 69 | */ 70 | public function getUrl() { 71 | return $this->_url; 72 | } 73 | 74 | /** 75 | * Set URL 76 | * 77 | * @param string $value 78 | * @return PHPExcel_Cell_Hyperlink 79 | */ 80 | public function setUrl($value = '') { 81 | $this->_url = $value; 82 | return $this; 83 | } 84 | 85 | /** 86 | * Get tooltip 87 | * 88 | * @return string 89 | */ 90 | public function getTooltip() { 91 | return $this->_tooltip; 92 | } 93 | 94 | /** 95 | * Set tooltip 96 | * 97 | * @param string $value 98 | * @return PHPExcel_Cell_Hyperlink 99 | */ 100 | public function setTooltip($value = '') { 101 | $this->_tooltip = $value; 102 | return $this; 103 | } 104 | 105 | /** 106 | * Is this hyperlink internal? (to another worksheet) 107 | * 108 | * @return boolean 109 | */ 110 | public function isInternal() { 111 | return strpos($this->_url, 'sheet://') !== false; 112 | } 113 | 114 | /** 115 | * Get hash code 116 | * 117 | * @return string Hash code 118 | */ 119 | public function getHashCode() { 120 | return md5( 121 | $this->_url 122 | . $this->_tooltip 123 | . __CLASS__ 124 | ); 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Cell/IValueBinder.php: -------------------------------------------------------------------------------- 1 | line = $line; 49 | $e->file = $file; 50 | throw $e; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Chart/PlotArea.php: -------------------------------------------------------------------------------- 1 | _layout = $layout; 58 | $this->_plotSeries = $plotSeries; 59 | } 60 | 61 | /** 62 | * Get Layout 63 | * 64 | * @return PHPExcel_Chart_Layout 65 | */ 66 | public function getLayout() { 67 | return $this->_layout; 68 | } 69 | 70 | /** 71 | * Get Number of Plot Groups 72 | * 73 | * @return array of PHPExcel_Chart_DataSeries 74 | */ 75 | public function getPlotGroupCount() { 76 | return count($this->_plotSeries); 77 | } 78 | 79 | /** 80 | * Get Number of Plot Series 81 | * 82 | * @return integer 83 | */ 84 | public function getPlotSeriesCount() { 85 | $seriesCount = 0; 86 | foreach($this->_plotSeries as $plot) { 87 | $seriesCount += $plot->getPlotSeriesCount(); 88 | } 89 | return $seriesCount; 90 | } 91 | 92 | /** 93 | * Get Plot Series 94 | * 95 | * @return array of PHPExcel_Chart_DataSeries 96 | */ 97 | public function getPlotGroup() { 98 | return $this->_plotSeries; 99 | } 100 | 101 | /** 102 | * Get Plot Series by Index 103 | * 104 | * @return PHPExcel_Chart_DataSeries 105 | */ 106 | public function getPlotGroupByIndex($index) { 107 | return $this->_plotSeries[$index]; 108 | } 109 | 110 | /** 111 | * Set Plot Series 112 | * 113 | * @param [PHPExcel_Chart_DataSeries] 114 | * @return PHPExcel_Chart_PlotArea 115 | */ 116 | public function setPlotSeries($plotSeries = array()) { 117 | $this->_plotSeries = $plotSeries; 118 | 119 | return $this; 120 | } 121 | 122 | public function refresh(PHPExcel_Worksheet $worksheet) { 123 | foreach($this->_plotSeries as $plotSeries) { 124 | $plotSeries->refresh($worksheet); 125 | } 126 | } 127 | 128 | } 129 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Chart/Renderer/PHP Charting Libraries.txt: -------------------------------------------------------------------------------- 1 | ChartDirector 2 | http://www.advsofteng.com/cdphp.html 3 | 4 | GraPHPite 5 | http://graphpite.sourceforge.net/ 6 | 7 | JpGraph 8 | http://www.aditus.nu/jpgraph/ 9 | 10 | LibChart 11 | http://naku.dohcrew.com/libchart/pages/introduction/ 12 | 13 | pChart 14 | http://pchart.sourceforge.net/ 15 | 16 | TeeChart 17 | http://www.steema.com/products/teechart/overview.html 18 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Chart/Title.php: -------------------------------------------------------------------------------- 1 | _caption = $caption; 59 | $this->_layout = $layout; 60 | } 61 | 62 | /** 63 | * Get caption 64 | * 65 | * @return string 66 | */ 67 | public function getCaption() { 68 | return $this->_caption; 69 | } 70 | 71 | /** 72 | * Set caption 73 | * 74 | * @param string $caption 75 | * @return PHPExcel_Chart_Title 76 | */ 77 | public function setCaption($caption = null) { 78 | $this->_caption = $caption; 79 | 80 | return $this; 81 | } 82 | 83 | /** 84 | * Get Layout 85 | * 86 | * @return PHPExcel_Chart_Layout 87 | */ 88 | public function getLayout() { 89 | return $this->_layout; 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Exception.php: -------------------------------------------------------------------------------- 1 | line = $line; 49 | $e->file = $file; 50 | throw $e; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/IComparable.php: -------------------------------------------------------------------------------- 1 | _themeName = $themeName; 76 | $this->_colourSchemeName = $colourSchemeName; 77 | $this->_colourMap = $colourMap; 78 | } 79 | 80 | /** 81 | * Get Theme Name 82 | * 83 | * @return string 84 | */ 85 | public function getThemeName() 86 | { 87 | return $this->_themeName; 88 | } 89 | 90 | /** 91 | * Get colour Scheme Name 92 | * 93 | * @return string 94 | */ 95 | public function getColourSchemeName() { 96 | return $this->_colourSchemeName; 97 | } 98 | 99 | /** 100 | * Get colour Map Value by Position 101 | * 102 | * @return string 103 | */ 104 | public function getColourByIndex($index=0) { 105 | if (isset($this->_colourMap[$index])) { 106 | return $this->_colourMap[$index]; 107 | } 108 | return null; 109 | } 110 | 111 | /** 112 | * Implement PHP __clone to create a deep clone, not just a shallow copy. 113 | */ 114 | public function __clone() { 115 | $vars = get_object_vars($this); 116 | foreach ($vars as $key => $value) { 117 | if ((is_object($value)) && ($key != '_parent')) { 118 | $this->$key = clone $value; 119 | } else { 120 | $this->$key = $value; 121 | } 122 | } 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Reader/Excel5/RC4.php: -------------------------------------------------------------------------------- 1 | i = 0; $this->i < 256; $this->i++) { 52 | $this->s[$this->i] = $this->i; 53 | } 54 | 55 | $this->j = 0; 56 | for ($this->i = 0; $this->i < 256; $this->i++) { 57 | $this->j = ($this->j + $this->s[$this->i] + ord($key[$this->i % $len])) % 256; 58 | $t = $this->s[$this->i]; 59 | $this->s[$this->i] = $this->s[$this->j]; 60 | $this->s[$this->j] = $t; 61 | } 62 | $this->i = $this->j = 0; 63 | } 64 | 65 | /** 66 | * Symmetric decryption/encryption function 67 | * 68 | * @param string $data Data to encrypt/decrypt 69 | * 70 | * @return string 71 | */ 72 | public function RC4($data) 73 | { 74 | $len = strlen($data); 75 | for ($c = 0; $c < $len; $c++) { 76 | $this->i = ($this->i + 1) % 256; 77 | $this->j = ($this->j + $this->s[$this->i]) % 256; 78 | $t = $this->s[$this->i]; 79 | $this->s[$this->i] = $this->s[$this->j]; 80 | $this->s[$this->j] = $t; 81 | 82 | $t = ($this->s[$this->i] + $this->s[$this->j]) % 256; 83 | 84 | $data[$c] = chr(ord($data[$c]) ^ $this->s[$t]); 85 | } 86 | return $data; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Reader/Exception.php: -------------------------------------------------------------------------------- 1 | line = $line; 49 | $e->file = $file; 50 | throw $e; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Reader/IReadFilter.php: -------------------------------------------------------------------------------- 1 | setText($pText); 52 | $this->_font = new PHPExcel_Style_Font(); 53 | } 54 | 55 | /** 56 | * Get font 57 | * 58 | * @return PHPExcel_Style_Font 59 | */ 60 | public function getFont() { 61 | return $this->_font; 62 | } 63 | 64 | /** 65 | * Set font 66 | * 67 | * @param PHPExcel_Style_Font $pFont Font 68 | * @throws PHPExcel_Exception 69 | * @return PHPExcel_RichText_ITextElement 70 | */ 71 | public function setFont(PHPExcel_Style_Font $pFont = null) { 72 | $this->_font = $pFont; 73 | return $this; 74 | } 75 | 76 | /** 77 | * Get hash code 78 | * 79 | * @return string Hash code 80 | */ 81 | public function getHashCode() { 82 | return md5( 83 | $this->getText() 84 | . $this->_font->getHashCode() 85 | . __CLASS__ 86 | ); 87 | } 88 | 89 | /** 90 | * Implement PHP __clone to create a deep clone, not just a shallow copy. 91 | */ 92 | public function __clone() { 93 | $vars = get_object_vars($this); 94 | foreach ($vars as $key => $value) { 95 | if (is_object($value)) { 96 | $this->$key = clone $value; 97 | } else { 98 | $this->$key = $value; 99 | } 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/RichText/TextElement.php: -------------------------------------------------------------------------------- 1 | _text = $pText; 52 | } 53 | 54 | /** 55 | * Get text 56 | * 57 | * @return string Text 58 | */ 59 | public function getText() { 60 | return $this->_text; 61 | } 62 | 63 | /** 64 | * Set text 65 | * 66 | * @param $pText string Text 67 | * @return PHPExcel_RichText_ITextElement 68 | */ 69 | public function setText($pText = '') { 70 | $this->_text = $pText; 71 | return $this; 72 | } 73 | 74 | /** 75 | * Get font 76 | * 77 | * @return PHPExcel_Style_Font 78 | */ 79 | public function getFont() { 80 | return null; 81 | } 82 | 83 | /** 84 | * Get hash code 85 | * 86 | * @return string Hash code 87 | */ 88 | public function getHashCode() { 89 | return md5( 90 | $this->_text 91 | . __CLASS__ 92 | ); 93 | } 94 | 95 | /** 96 | * Implement PHP __clone to create a deep clone, not just a shallow copy. 97 | */ 98 | public function __clone() { 99 | $vars = get_object_vars($this); 100 | foreach ($vars as $key => $value) { 101 | if (is_object($value)) { 102 | $this->$key = clone $value; 103 | } else { 104 | $this->$key = $value; 105 | } 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Shared/Escher.php: -------------------------------------------------------------------------------- 1 | _dggContainer; 59 | } 60 | 61 | /** 62 | * Set Drawing Group Container 63 | * 64 | * @param PHPExcel_Shared_Escher_DggContainer $dggContainer 65 | */ 66 | public function setDggContainer($dggContainer) 67 | { 68 | return $this->_dggContainer = $dggContainer; 69 | } 70 | 71 | /** 72 | * Get Drawing Container 73 | * 74 | * @return PHPExcel_Shared_Escher_DgContainer 75 | */ 76 | public function getDgContainer() 77 | { 78 | return $this->_dgContainer; 79 | } 80 | 81 | /** 82 | * Set Drawing Container 83 | * 84 | * @param PHPExcel_Shared_Escher_DgContainer $dgContainer 85 | */ 86 | public function setDgContainer($dgContainer) 87 | { 88 | return $this->_dgContainer = $dgContainer; 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Shared/Escher/DgContainer.php: -------------------------------------------------------------------------------- 1 | _dgId; 56 | } 57 | 58 | public function setDgId($value) 59 | { 60 | $this->_dgId = $value; 61 | } 62 | 63 | public function getLastSpId() 64 | { 65 | return $this->_lastSpId; 66 | } 67 | 68 | public function setLastSpId($value) 69 | { 70 | $this->_lastSpId = $value; 71 | } 72 | 73 | public function getSpgrContainer() 74 | { 75 | return $this->_spgrContainer; 76 | } 77 | 78 | public function setSpgrContainer($spgrContainer) 79 | { 80 | return $this->_spgrContainer = $spgrContainer; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php: -------------------------------------------------------------------------------- 1 | _parent = $parent; 59 | } 60 | 61 | /** 62 | * Get the parent Shape Group Container if any 63 | * 64 | * @return PHPExcel_Shared_Escher_DgContainer_SpgrContainer|null 65 | */ 66 | public function getParent() 67 | { 68 | return $this->_parent; 69 | } 70 | 71 | /** 72 | * Add a child. This will be either spgrContainer or spContainer 73 | * 74 | * @param mixed $child 75 | */ 76 | public function addChild($child) 77 | { 78 | $this->_children[] = $child; 79 | $child->setParent($this); 80 | } 81 | 82 | /** 83 | * Get collection of Shape Containers 84 | */ 85 | public function getChildren() 86 | { 87 | return $this->_children; 88 | } 89 | 90 | /** 91 | * Recursively get all spContainers within this spgrContainer 92 | * 93 | * @return PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer[] 94 | */ 95 | public function getAllSpContainers() 96 | { 97 | $allSpContainers = array(); 98 | 99 | foreach ($this->_children as $child) { 100 | if ($child instanceof PHPExcel_Shared_Escher_DgContainer_SpgrContainer) { 101 | $allSpContainers = array_merge($allSpContainers, $child->getAllSpContainers()); 102 | } else { 103 | $allSpContainers[] = $child; 104 | } 105 | } 106 | 107 | return $allSpContainers; 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer.php: -------------------------------------------------------------------------------- 1 | _BSECollection[] = $BSE; 52 | $BSE->setParent($this); 53 | } 54 | 55 | /** 56 | * Get the collection of BLIP Store Entries 57 | * 58 | * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE[] 59 | */ 60 | public function getBSECollection() 61 | { 62 | return $this->_BSECollection; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE.php: -------------------------------------------------------------------------------- 1 | _parent = $parent; 77 | } 78 | 79 | /** 80 | * Get the BLIP 81 | * 82 | * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip 83 | */ 84 | public function getBlip() 85 | { 86 | return $this->_blip; 87 | } 88 | 89 | /** 90 | * Set the BLIP 91 | * 92 | * @param PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip $blip 93 | */ 94 | public function setBlip($blip) 95 | { 96 | $this->_blip = $blip; 97 | $blip->setParent($this); 98 | } 99 | 100 | /** 101 | * Get the BLIP type 102 | * 103 | * @return int 104 | */ 105 | public function getBlipType() 106 | { 107 | return $this->_blipType; 108 | } 109 | 110 | /** 111 | * Set the BLIP type 112 | * 113 | * @param int 114 | */ 115 | public function setBlipType($blipType) 116 | { 117 | $this->_blipType = $blipType; 118 | } 119 | 120 | } 121 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php: -------------------------------------------------------------------------------- 1 | _data; 59 | } 60 | 61 | /** 62 | * Set the raw image data 63 | * 64 | * @param string 65 | */ 66 | public function setData($data) 67 | { 68 | $this->_data = $data; 69 | } 70 | 71 | /** 72 | * Set parent BSE 73 | * 74 | * @param PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE $parent 75 | */ 76 | public function setParent($parent) 77 | { 78 | $this->_parent = $parent; 79 | } 80 | 81 | /** 82 | * Get parent BSE 83 | * 84 | * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE $parent 85 | */ 86 | public function getParent() 87 | { 88 | return $this->_parent; 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Shared/JAMA/CHANGELOG.TXT: -------------------------------------------------------------------------------- 1 | Mar 1, 2005 11:15 AST by PM 2 | 3 | + For consistency, renamed Math.php to Maths.java, utils to util, 4 | tests to test, docs to doc - 5 | 6 | + Removed conditional logic from top of Matrix class. 7 | 8 | + Switched to using hypo function in Maths.php for all php-hypot calls. 9 | NOTE TO SELF: Need to make sure that all decompositions have been 10 | switched over to using the bundled hypo. 11 | 12 | Feb 25, 2005 at 10:00 AST by PM 13 | 14 | + Recommend using simpler Error.php instead of JAMA_Error.php but 15 | can be persuaded otherwise. 16 | 17 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Shared/JAMA/utils/Error.php: -------------------------------------------------------------------------------- 1 | abs($b)) { 16 | $r = $b / $a; 17 | $r = abs($a) * sqrt(1 + $r * $r); 18 | } elseif ($b != 0) { 19 | $r = $a / $b; 20 | $r = abs($b) * sqrt(1 + $r * $r); 21 | } else { 22 | $r = 0.0; 23 | } 24 | return $r; 25 | } // function hypo() 26 | 27 | 28 | /** 29 | * Mike Bommarito's version. 30 | * Compute n-dimensional hyotheneuse. 31 | * 32 | function hypot() { 33 | $s = 0; 34 | foreach (func_get_args() as $d) { 35 | if (is_numeric($d)) { 36 | $s += pow($d, 2); 37 | } else { 38 | throw new PHPExcel_Calculation_Exception(JAMAError(ArgumentTypeException)); 39 | } 40 | } 41 | return sqrt($s); 42 | } 43 | */ 44 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Shared/OLE/PPS/File.php: -------------------------------------------------------------------------------- 1 | | 17 | // | Based on OLE::Storage_Lite by Kawai, Takanori | 18 | // +----------------------------------------------------------------------+ 19 | // 20 | // $Id: File.php,v 1.11 2007/02/13 21:00:42 schmidt Exp $ 21 | 22 | 23 | /** 24 | * Class for creating File PPS's for OLE containers 25 | * 26 | * @author Xavier Noguer 27 | * @category PHPExcel 28 | * @package PHPExcel_Shared_OLE 29 | */ 30 | class PHPExcel_Shared_OLE_PPS_File extends PHPExcel_Shared_OLE_PPS 31 | { 32 | /** 33 | * The constructor 34 | * 35 | * @access public 36 | * @param string $name The name of the file (in Unicode) 37 | * @see OLE::Asc2Ucs() 38 | */ 39 | public function __construct($name) 40 | { 41 | parent::__construct( 42 | null, 43 | $name, 44 | PHPExcel_Shared_OLE::OLE_PPS_TYPE_FILE, 45 | null, 46 | null, 47 | null, 48 | null, 49 | null, 50 | '', 51 | array()); 52 | } 53 | 54 | /** 55 | * Initialization method. Has to be called right after OLE_PPS_File(). 56 | * 57 | * @access public 58 | * @return mixed true on success 59 | */ 60 | public function init() 61 | { 62 | return true; 63 | } 64 | 65 | /** 66 | * Append data to PPS 67 | * 68 | * @access public 69 | * @param string $data The data to append 70 | */ 71 | public function append($data) 72 | { 73 | $this->_data .= $data; 74 | } 75 | 76 | /** 77 | * Returns a stream for reading this file using fread() etc. 78 | * @return resource a read-only stream 79 | */ 80 | public function getStream() 81 | { 82 | $this->ole->getStream($this); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Shared/PasswordHasher.php: -------------------------------------------------------------------------------- 1 | . 44 | * 45 | * @param string $pPassword Password to hash 46 | * @return string Hashed password 47 | */ 48 | public static function hashPassword($pPassword = '') { 49 | $password = 0x0000; 50 | $charPos = 1; // char position 51 | 52 | // split the plain text password in its component characters 53 | $chars = preg_split('//', $pPassword, -1, PREG_SPLIT_NO_EMPTY); 54 | foreach ($chars as $char) { 55 | $value = ord($char) << $charPos++; // shifted ASCII value 56 | $rotated_bits = $value >> 15; // rotated bits beyond bit 15 57 | $value &= 0x7fff; // first 15 bits 58 | $password ^= ($value | $rotated_bits); 59 | } 60 | 61 | $password ^= strlen($pPassword); 62 | $password ^= 0xCE4B; 63 | 64 | return(strtoupper(dechex($password))); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Shared/XMLWriter.php: -------------------------------------------------------------------------------- 1 | openMemory(); 66 | } else { 67 | // Create temporary filename 68 | if ($pTemporaryStorageFolder === NULL) 69 | $pTemporaryStorageFolder = PHPExcel_Shared_File::sys_get_temp_dir(); 70 | $this->_tempFileName = @tempnam($pTemporaryStorageFolder, 'xml'); 71 | 72 | // Open storage 73 | if ($this->openUri($this->_tempFileName) === false) { 74 | // Fallback to memory... 75 | $this->openMemory(); 76 | } 77 | } 78 | 79 | // Set default values 80 | if (DEBUGMODE_ENABLED) { 81 | $this->setIndent(true); 82 | } 83 | } 84 | 85 | /** 86 | * Destructor 87 | */ 88 | public function __destruct() { 89 | // Unlink temporary files 90 | if ($this->_tempFileName != '') { 91 | @unlink($this->_tempFileName); 92 | } 93 | } 94 | 95 | /** 96 | * Get written data 97 | * 98 | * @return $data 99 | */ 100 | public function getData() { 101 | if ($this->_tempFileName == '') { 102 | return $this->outputMemory(true); 103 | } else { 104 | $this->flush(); 105 | return file_get_contents($this->_tempFileName); 106 | } 107 | } 108 | 109 | /** 110 | * Fallback method for writeRaw, introduced in PHP 5.2 111 | * 112 | * @param string $text 113 | * @return string 114 | */ 115 | public function writeRawData($text) 116 | { 117 | if (is_array($text)) { 118 | $text = implode("\n",$text); 119 | } 120 | 121 | if (method_exists($this, 'writeRaw')) { 122 | return $this->writeRaw(htmlspecialchars($text)); 123 | } 124 | 125 | return $this->text($text); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Shared/trend/linearBestFitClass.php: -------------------------------------------------------------------------------- 1 | getIntersect() + $this->getSlope() * $xValue; 58 | } // function getValueOfYForX() 59 | 60 | 61 | /** 62 | * Return the X-Value for a specified value of Y 63 | * 64 | * @param float $yValue Y-Value 65 | * @return float X-Value 66 | **/ 67 | public function getValueOfXForY($yValue) { 68 | return ($yValue - $this->getIntersect()) / $this->getSlope(); 69 | } // function getValueOfXForY() 70 | 71 | 72 | /** 73 | * Return the Equation of the best-fit line 74 | * 75 | * @param int $dp Number of places of decimal precision to display 76 | * @return string 77 | **/ 78 | public function getEquation($dp=0) { 79 | $slope = $this->getSlope($dp); 80 | $intersect = $this->getIntersect($dp); 81 | 82 | return 'Y = '.$intersect.' + '.$slope.' * X'; 83 | } // function getEquation() 84 | 85 | 86 | /** 87 | * Execute the regression and calculate the goodness of fit for a set of X and Y data values 88 | * 89 | * @param float[] $yValues The set of Y-values for this regression 90 | * @param float[] $xValues The set of X-values for this regression 91 | * @param boolean $const 92 | */ 93 | private function _linear_regression($yValues, $xValues, $const) { 94 | $this->_leastSquareFit($yValues, $xValues,$const); 95 | } // function _linear_regression() 96 | 97 | 98 | /** 99 | * Define the regression and calculate the goodness of fit for a set of X and Y data values 100 | * 101 | * @param float[] $yValues The set of Y-values for this regression 102 | * @param float[] $xValues The set of X-values for this regression 103 | * @param boolean $const 104 | */ 105 | function __construct($yValues, $xValues=array(), $const=True) { 106 | if (parent::__construct($yValues, $xValues) !== False) { 107 | $this->_linear_regression($yValues, $xValues, $const); 108 | } 109 | } // function __construct() 110 | 111 | } // class linearBestFit -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Style/Supervisor.php: -------------------------------------------------------------------------------- 1 | _isSupervisor = $isSupervisor; 63 | } 64 | 65 | /** 66 | * Bind parent. Only used for supervisor 67 | * 68 | * @param PHPExcel $parent 69 | * @return PHPExcel_Style_Supervisor 70 | */ 71 | public function bindParent($parent, $parentPropertyName=NULL) 72 | { 73 | $this->_parent = $parent; 74 | return $this; 75 | } 76 | 77 | /** 78 | * Is this a supervisor or a cell style component? 79 | * 80 | * @return boolean 81 | */ 82 | public function getIsSupervisor() 83 | { 84 | return $this->_isSupervisor; 85 | } 86 | 87 | /** 88 | * Get the currently active sheet. Only used for supervisor 89 | * 90 | * @return PHPExcel_Worksheet 91 | */ 92 | public function getActiveSheet() 93 | { 94 | return $this->_parent->getActiveSheet(); 95 | } 96 | 97 | /** 98 | * Get the currently active cell coordinate in currently active sheet. 99 | * Only used for supervisor 100 | * 101 | * @return string E.g. 'A1' 102 | */ 103 | public function getSelectedCells() 104 | { 105 | return $this->getActiveSheet()->getSelectedCells(); 106 | } 107 | 108 | /** 109 | * Get the currently active cell coordinate in currently active sheet. 110 | * Only used for supervisor 111 | * 112 | * @return string E.g. 'A1' 113 | */ 114 | public function getActiveCell() 115 | { 116 | return $this->getActiveSheet()->getActiveCell(); 117 | } 118 | 119 | /** 120 | * Implement PHP __clone to create a deep clone, not just a shallow copy. 121 | */ 122 | public function __clone() { 123 | $vars = get_object_vars($this); 124 | foreach ($vars as $key => $value) { 125 | if ((is_object($value)) && ($key != '_parent')) { 126 | $this->$key = clone $value; 127 | } else { 128 | $this->$key = $value; 129 | } 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Worksheet/Row.php: -------------------------------------------------------------------------------- 1 | _parent = $parent; 63 | $this->_rowIndex = $rowIndex; 64 | } 65 | 66 | /** 67 | * Destructor 68 | */ 69 | public function __destruct() { 70 | unset($this->_parent); 71 | } 72 | 73 | /** 74 | * Get row index 75 | * 76 | * @return int 77 | */ 78 | public function getRowIndex() { 79 | return $this->_rowIndex; 80 | } 81 | 82 | /** 83 | * Get cell iterator 84 | * 85 | * @return PHPExcel_Worksheet_CellIterator 86 | */ 87 | public function getCellIterator() { 88 | return new PHPExcel_Worksheet_CellIterator($this->_parent, $this->_rowIndex); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Worksheet/RowIterator.php: -------------------------------------------------------------------------------- 1 | _subject = $subject; 71 | $this->resetStart($startRow); 72 | } 73 | 74 | /** 75 | * Destructor 76 | */ 77 | public function __destruct() { 78 | unset($this->_subject); 79 | } 80 | 81 | /** 82 | * (Re)Set the start row and the current row pointer 83 | * 84 | * @param integer $startRow The row number at which to start iterating 85 | */ 86 | public function resetStart($startRow = 1) { 87 | $this->_startRow = $startRow; 88 | $this->seek($startRow); 89 | } 90 | 91 | /** 92 | * Set the row pointer to the selected row 93 | * 94 | * @param integer $row The row number to set the current pointer at 95 | */ 96 | public function seek($row = 1) { 97 | $this->_position = $row; 98 | } 99 | 100 | /** 101 | * Rewind the iterator to the starting row 102 | */ 103 | public function rewind() { 104 | $this->_position = $this->_startRow; 105 | } 106 | 107 | /** 108 | * Return the current row in this worksheet 109 | * 110 | * @return PHPExcel_Worksheet_Row 111 | */ 112 | public function current() { 113 | return new PHPExcel_Worksheet_Row($this->_subject, $this->_position); 114 | } 115 | 116 | /** 117 | * Return the current iterator key 118 | * 119 | * @return int 120 | */ 121 | public function key() { 122 | return $this->_position; 123 | } 124 | 125 | /** 126 | * Set the iterator to its next value 127 | */ 128 | public function next() { 129 | ++$this->_position; 130 | } 131 | 132 | /** 133 | * Set the iterator to its previous value 134 | */ 135 | public function prev() { 136 | if ($this->_position > 1) 137 | --$this->_position; 138 | } 139 | 140 | /** 141 | * Indicate if more rows exist in the worksheet 142 | * 143 | * @return boolean 144 | */ 145 | public function valid() { 146 | return $this->_position <= $this->_subject->getHighestRow(); 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/WorksheetIterator.php: -------------------------------------------------------------------------------- 1 | _subject = $subject; 63 | } 64 | 65 | /** 66 | * Destructor 67 | */ 68 | public function __destruct() 69 | { 70 | unset($this->_subject); 71 | } 72 | 73 | /** 74 | * Rewind iterator 75 | */ 76 | public function rewind() 77 | { 78 | $this->_position = 0; 79 | } 80 | 81 | /** 82 | * Current PHPExcel_Worksheet 83 | * 84 | * @return PHPExcel_Worksheet 85 | */ 86 | public function current() 87 | { 88 | return $this->_subject->getSheet($this->_position); 89 | } 90 | 91 | /** 92 | * Current key 93 | * 94 | * @return int 95 | */ 96 | public function key() 97 | { 98 | return $this->_position; 99 | } 100 | 101 | /** 102 | * Next value 103 | */ 104 | public function next() 105 | { 106 | ++$this->_position; 107 | } 108 | 109 | /** 110 | * More PHPExcel_Worksheet instances available? 111 | * 112 | * @return boolean 113 | */ 114 | public function valid() 115 | { 116 | return $this->_position < $this->_subject->getSheetCount(); 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Writer/Excel2007/RelsRibbon.php: -------------------------------------------------------------------------------- 1 | getParentWriter()->getUseDiskCaching()) { 49 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); 50 | } else { 51 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); 52 | } 53 | 54 | // XML header 55 | $objWriter->startDocument('1.0','UTF-8','yes'); 56 | 57 | // Relationships 58 | $objWriter->startElement('Relationships'); 59 | $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); 60 | $localRels=$pPHPExcel->getRibbonBinObjects('names'); 61 | if(is_array($localRels)){ 62 | foreach($localRels as $aId=>$aTarget){ 63 | $objWriter->startElement('Relationship'); 64 | $objWriter->writeAttribute('Id', $aId); 65 | $objWriter->writeAttribute('Type', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image'); 66 | $objWriter->writeAttribute('Target', $aTarget); 67 | $objWriter->endElement();//Relationship 68 | } 69 | } 70 | $objWriter->endElement();//Relationships 71 | 72 | // Return 73 | return $objWriter->getData(); 74 | 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Writer/Excel2007/RelsVBA.php: -------------------------------------------------------------------------------- 1 | getParentWriter()->getUseDiskCaching()) { 49 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); 50 | } else { 51 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); 52 | } 53 | 54 | // XML header 55 | $objWriter->startDocument('1.0','UTF-8','yes'); 56 | 57 | // Relationships 58 | $objWriter->startElement('Relationships'); 59 | $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); 60 | $objWriter->startElement('Relationship'); 61 | $objWriter->writeAttribute('Id', 'rId1'); 62 | $objWriter->writeAttribute('Type', 'http://schemas.microsoft.com/office/2006/relationships/vbaProjectSignature'); 63 | $objWriter->writeAttribute('Target', 'vbaProjectSignature.bin'); 64 | $objWriter->endElement();//Relationship 65 | $objWriter->endElement();//Relationships 66 | 67 | // Return 68 | return $objWriter->getData(); 69 | 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Writer/Excel2007/WriterPart.php: -------------------------------------------------------------------------------- 1 | _parentWriter = $pWriter; 53 | } 54 | 55 | /** 56 | * Get parent IWriter object 57 | * 58 | * @return PHPExcel_Writer_IWriter 59 | * @throws PHPExcel_Writer_Exception 60 | */ 61 | public function getParentWriter() { 62 | if (!is_null($this->_parentWriter)) { 63 | return $this->_parentWriter; 64 | } else { 65 | throw new PHPExcel_Writer_Exception("No parent PHPExcel_Writer_IWriter assigned."); 66 | } 67 | } 68 | 69 | /** 70 | * Set parent IWriter object 71 | * 72 | * @param PHPExcel_Writer_IWriter $pWriter 73 | * @throws PHPExcel_Writer_Exception 74 | */ 75 | public function __construct(PHPExcel_Writer_IWriter $pWriter = null) { 76 | if (!is_null($pWriter)) { 77 | $this->_parentWriter = $pWriter; 78 | } 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Writer/Exception.php: -------------------------------------------------------------------------------- 1 | line = $line; 49 | $e->file = $file; 50 | throw $e; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/Writer/IWriter.php: -------------------------------------------------------------------------------- 1 | _renderer = new $rendererName($phpExcel); 71 | } 72 | 73 | 74 | /** 75 | * Magic method to handle direct calls to the configured PDF renderer wrapper class. 76 | * 77 | * @param string $name Renderer library method name 78 | * @param mixed[] $arguments Array of arguments to pass to the renderer method 79 | * @return mixed Returned data from the PDF renderer wrapper method 80 | */ 81 | public function __call($name, $arguments) 82 | { 83 | if ($this->_renderer === NULL) { 84 | throw new PHPExcel_Writer_Exception("PDF Rendering library has not been defined."); 85 | } 86 | 87 | return call_user_func_array(array($this->_renderer, $name), $arguments); 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/bg/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | 5 | ## Copyright (c) 2006 - 2013 PHPExcel 6 | ## 7 | ## This library is free software; you can redistribute it and/or 8 | ## modify it under the terms of the GNU Lesser General Public 9 | ## License as published by the Free Software Foundation; either 10 | ## version 2.1 of the License, or (at your option) any later version. 11 | ## 12 | ## This library is distributed in the hope that it will be useful, 13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | ## Lesser General Public License for more details. 16 | ## 17 | ## You should have received a copy of the GNU Lesser General Public 18 | ## License along with this library; if not, write to the Free Software 19 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | ## 21 | ## @category PHPExcel 22 | ## @package PHPExcel_Settings 23 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 24 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 25 | ## @version 1.8.0, 2014-03-02 26 | ## 27 | ## 28 | 29 | 30 | ArgumentSeparator = ; 31 | 32 | 33 | ## 34 | ## (For future use) 35 | ## 36 | currencySymbol = лв 37 | 38 | 39 | ## 40 | ## Excel Error Codes (For future use) 41 | 42 | ## 43 | NULL = #ПРАЗНО! 44 | DIV0 = #ДЕЛ/0! 45 | VALUE = #СТОЙНОСТ! 46 | REF = #РЕФ! 47 | NAME = #ИМЕ? 48 | NUM = #ЧИСЛО! 49 | NA = #Н/Д 50 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/cs/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = Kč 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULL! 42 | DIV0 = #DIV/0! 43 | VALUE = #HODNOTA! 44 | REF = #REF! 45 | NAME = #NÁZEV? 46 | NUM = #NUM! 47 | NA = #N/A 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/da/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = kr 36 | 37 | 38 | 39 | ## 40 | ## Excel Error Codes (For future use) 41 | ## 42 | NULL = #NUL! 43 | DIV0 = #DIVISION/0! 44 | VALUE = #VÆRDI! 45 | REF = #REFERENCE! 46 | NAME = #NAVN? 47 | NUM = #NUM! 48 | NA = #I/T 49 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/de/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULL! 42 | DIV0 = #DIV/0! 43 | VALUE = #WERT! 44 | REF = #BEZUG! 45 | NAME = #NAME? 46 | NUM = #ZAHL! 47 | NA = #NV 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/en/uk/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ## 30 | ## (For future use) 31 | ## 32 | currencySymbol = £ 33 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/es/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rather than € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #¡NULO! 42 | DIV0 = #¡DIV/0! 43 | VALUE = #¡VALOR! 44 | REF = #¡REF! 45 | NAME = #¿NOMBRE? 46 | NUM = #¡NÚM! 47 | NA = #N/A 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/fi/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = $ # Symbol not known, should it be a € (Euro)? 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #TYHJÄ! 42 | DIV0 = #JAKO/0! 43 | VALUE = #ARVO! 44 | REF = #VIITTAUS! 45 | NAME = #NIMI? 46 | NUM = #LUKU! 47 | NA = #PUUTTUU 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/fr/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NUL! 42 | DIV0 = #DIV/0! 43 | VALUE = #VALEUR! 44 | REF = #REF! 45 | NAME = #NOM? 46 | NUM = #NOMBRE! 47 | NA = #N/A 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/hu/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = Ft 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULLA! 42 | DIV0 = #ZÉRÓOSZTÓ! 43 | VALUE = #ÉRTÉK! 44 | REF = #HIV! 45 | NAME = #NÉV? 46 | NUM = #SZÁM! 47 | NA = #HIÁNYZIK 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/it/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULLO! 42 | DIV0 = #DIV/0! 43 | VALUE = #VALORE! 44 | REF = #RIF! 45 | NAME = #NOME? 46 | NUM = #NUM! 47 | NA = #N/D 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/nl/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #LEEG! 42 | DIV0 = #DEEL/0! 43 | VALUE = #WAARDE! 44 | REF = #VERW! 45 | NAME = #NAAM? 46 | NUM = #GETAL! 47 | NA = #N/B 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/no/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = kr 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULL! 42 | DIV0 = #DIV/0! 43 | VALUE = #VERDI! 44 | REF = #REF! 45 | NAME = #NAVN? 46 | NUM = #NUM! 47 | NA = #I/T 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/pl/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = zł 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #ZERO! 42 | DIV0 = #DZIEL/0! 43 | VALUE = #ARG! 44 | REF = #ADR! 45 | NAME = #NAZWA? 46 | NUM = #LICZBA! 47 | NA = #N/D! 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/pt/br/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = R$ 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULO! 42 | DIV0 = #DIV/0! 43 | VALUE = #VALOR! 44 | REF = #REF! 45 | NAME = #NOME? 46 | NUM = #NÚM! 47 | NA = #N/D 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/pt/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULO! 42 | DIV0 = #DIV/0! 43 | VALUE = #VALOR! 44 | REF = #REF! 45 | NAME = #NOME? 46 | NUM = #NÚM! 47 | NA = #N/D 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/ru/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = р 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #ПУСТО! 42 | DIV0 = #ДЕЛ/0! 43 | VALUE = #ЗНАЧ! 44 | REF = #ССЫЛ! 45 | NAME = #ИМЯ? 46 | NUM = #ЧИСЛО! 47 | NA = #Н/Д 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/sv/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = kr 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #Skärning! 42 | DIV0 = #Division/0! 43 | VALUE = #Värdefel! 44 | REF = #Referens! 45 | NAME = #Namn? 46 | NUM = #Ogiltigt! 47 | NA = #Saknas! 48 | -------------------------------------------------------------------------------- /lib/PHPExcel/PHPExcel/locale/tr/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.8.0, 2014-03-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = YTL 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #BOŞ! 42 | DIV0 = #SAYI/0! 43 | VALUE = #DEĞER! 44 | REF = #BAŞV! 45 | NAME = #AD? 46 | NUM = #SAYI! 47 | NA = #YOK 48 | -------------------------------------------------------------------------------- /migrations/m160108_095739_create_news_table.php: -------------------------------------------------------------------------------- 1 | className() . '.sql'); 11 | $this->execute($sql); 12 | } 13 | 14 | public function down() 15 | { 16 | echo "m160108_095739_create_news_table cannot be reverted.\n"; 17 | 18 | return false; 19 | } 20 | 21 | /* 22 | // Use safeUp/safeDown to run migration code within a transaction 23 | public function safeUp() 24 | { 25 | } 26 | 27 | public function safeDown() 28 | { 29 | } 30 | */ 31 | } 32 | -------------------------------------------------------------------------------- /migrations/m160108_101725_create_andinsert.php: -------------------------------------------------------------------------------- 1 | execute($sql); 26 | } 27 | 28 | public function down() 29 | { 30 | echo "m160108_101859_create_andinsert cannot be reverted.\n"; 31 | 32 | return false; 33 | } 34 | 35 | /* 36 | // Use safeUp/safeDown to run migration code within a transaction 37 | public function safeUp() 38 | { 39 | } 40 | 41 | public function safeDown() 42 | { 43 | } 44 | */ 45 | public function upSql(){ 46 | 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /migrations/m160511_074937_fec.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
My Name is 6 | 10 | 11 |
--------------------------------------------------------------------------------